summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-10 13:53:27 +0000
committerwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-10 13:53:27 +0000
commitdeed6fbb6dba5082ab5627e0181598761cccb081 (patch)
tree7b0dd80286a71f52100881757df30a3ae9512477 /test
parentc43e977e2896d57f616919a6c9c7301f7fae9804 (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.rb8
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