Skip to content

Commit

Permalink
Fix Ruby 1.8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Mar 10, 2011
1 parent cccb641 commit 76f9a7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/net/backports.rb
@@ -1,3 +1,5 @@
require "stringio"

class StringIO
def read_nonblock(*args)
val = read(*args)
Expand Down
2 changes: 2 additions & 0 deletions lib/net/http.rb
Expand Up @@ -755,6 +755,8 @@ def connect
if use_ssl?
ssl_parameters = Hash.new
iv_list = instance_variables
iv_list = iv_list.map { |name| name.to_sym } unless iv_list.first.is_a?(Symbol)

SSL_ATTRIBUTES.each do |name|
ivname = "@#{name}".intern
if iv_list.include?(ivname) and
Expand Down
4 changes: 2 additions & 2 deletions test/test_https.rb
Expand Up @@ -3,8 +3,8 @@
require 'net/https'
require 'stringio'
require 'timeout'
require File.expand_path("../../openssl/utils", File.dirname(__FILE__))
require File.expand_path("utils", File.dirname(__FILE__))
require 'openssl/utils'
require 'utils'
rescue LoadError
# should skip this test
end
Expand Down

0 comments on commit 76f9a7c

Please sign in to comment.