aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-01 09:12:09 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-01 09:12:09 +0000
commita60856f0100caffc22c0ae16ee6797b2120e2d13 (patch)
tree6b107c921a11fe5d323cf3b06ad4b1e00e264ef5 /test/ruby/test_hash.rb
parent30aa6b99cafa63269b8845e335290cb4f4f046b5 (diff)
downloadruby-a60856f0100caffc22c0ae16ee6797b2120e2d13.tar.gz
add tests for [ruby-dev:34556] and [ruby-dev:34555].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r--test/ruby/test_hash.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index 9c2978cd8a..4c4dea84b7 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -671,6 +671,9 @@ class TestHash < Test::Unit::TestCase
assert_equal({1=>2, 3=>4}, Hash[[[1,2],[3,4]]])
assert_raise(ArgumentError) { Hash[0, 1, 2] }
assert_equal({1=>2, 3=>4}, Hash[1,2,3,4])
+ o = Object.new
+ def o.to_hash() {1=>2} end
+ assert_equal({1=>2}, Hash[o], "[ruby-dev:34555]")
end
def test_rehash2