ruby/ruby — pull request #762 by dresselm (2014-11-17 21:05:02+00:00)
Title: Set ssl version from params

`Net::Http` supports an `ssl_version` parameter. Unfortunately, the `Net::Http#connect` method passes the parameter via the `OpenSSL::SSL::SSLContext#set_params` method:

```
@ssl_context = OpenSSL::SSL::SSLContext.new
@ssl_context.set_params(ssl_parameters)
```

It appears based on debugging that `set_params` should not set the `ssl_version` despite it being a key in `DEFAULT_PARAMS` and `Net::Http#connect` should do something like the following:

```
@ssl_context = OpenSSL::SSL::SSLContext.new
@ssl_context.set_params(ssl_parameters)
@ssl_context.ssl_version = ssl_version
```

The included test fails when `set_params` is called, but passes when only `ssl_version=` is called.