mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/http.rb (Net::HTTP#use_ssl?): require 'openssl' only when
https is needed. fixes r31933. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1afe9dbdfd
commit
df36601017
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jun 13 17:02:34 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/net/http.rb (Net::HTTP#use_ssl?): require 'openssl' only when
|
||||
https is needed. fixes r31933.
|
||||
|
||||
Mon Jun 13 14:35:00 2011 Kenta Murata <mrkn@mrkn.jp>
|
||||
|
||||
* lib/cmath.rb (CMath.cbrt): returns the principal value of the cube
|
||||
|
|
|
@ -657,8 +657,10 @@ module Net #:nodoc:
|
|||
|
||||
# Returns true if SSL/TLS is being used with HTTP.
|
||||
def use_ssl?
|
||||
require 'openssl' unless defined?(OpenSSL)
|
||||
@use_ssl
|
||||
if @use_ssl
|
||||
require 'openssl' unless defined?(OpenSSL)
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
# Turn on/off SSL.
|
||||
|
|
Loading…
Reference in a new issue