summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-29 11:24:08 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-29 11:24:08 +0000
commitef01a5a6490472e00cad6562074e0eab77aa4f22 (patch)
tree8de894f4f2f91bc99120fa5ea45c2e869896347b /test
parent7440815128e50103688fe369713f3e609d127a02 (diff)
* hash.c (rb_hash_assoc): revert r42224. table->type->compare is
called only if hashes are matched. * test/ruby/test_hash.rb: add a test to check using #== to compare. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_hash.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index e8b8ef040c8..5694d2f01e2 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -876,6 +876,7 @@ class TestHash < Test::Unit::TestCase
def test_assoc
assert_equal([3,4], {1=>2, 3=>4, 5=>6}.assoc(3))
assert_nil({1=>2, 3=>4, 5=>6}.assoc(4))
+ assert_equal([1.0,1], {1.0=>1}.assoc(1))
end
def test_rassoc