From 0bd0d6ab6be3f4f05fb486483a9bd10760971687 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 7 Jun 2008 16:19:47 +0000 Subject: * hash.c (hash_i): make Hash#hash order insensitive. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_hash.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index c3acf14e3..c86cf3297 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -830,4 +830,8 @@ class TestHash < Test::Unit::TestCase #assert_equal("bar", h[a]) assert_nil(h["foo"]) end + + def test_hash_hash + assert_equal({0=>2,11=>1}.hash, {11=>1,0=>2}.hash) + end end -- cgit