diff options
author | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-10 13:53:27 +0000 |
---|---|---|
committer | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-10 13:53:27 +0000 |
commit | deed6fbb6dba5082ab5627e0181598761cccb081 (patch) | |
tree | 7b0dd80286a71f52100881757df30a3ae9512477 /test | |
parent | c43e977e2896d57f616919a6c9c7301f7fae9804 (diff) |
lib/uri/generic.rb: Backport #2428 [ruby-core:27019]; fixed #eql? so that it can handle being passed a nil value.
test/generic/test_generic.rb: added a test for the fix to #eql?.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/uri/test_generic.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb index 8a7feb4982..33c8ab91d3 100644 --- a/test/uri/test_generic.rb +++ b/test/uri/test_generic.rb @@ -692,6 +692,14 @@ class TestGeneric < Test::Unit::TestCase assert_raises(URI::InvalidURIError) { uri.path = 'bar' } assert_raises(URI::InvalidURIError) { uri.query = 'bar' } end + + def test_eql + require 'uri' + uri = URI.parse 'http://gemcutter.org' + + assert_equal(false,uri.eql?(nil)) # => blows up prior to the bug fix for Backport #2428 [ruby-core:27019] + end + end |