* test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new test

to show the problem of r37232.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2012-10-17 02:06:34 +00:00
Родитель 8f58f60643
Коммит 38c0b5f0e3
2 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Wed Oct 17 11:04:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new test
to show the problem of r37232.
Wed Oct 17 10:48:40 2012 Shugo Maeda <shugo@ruby-lang.org>
* vm_insnhelper.c (vm_search_method): fix a build error that occurs

Просмотреть файл

@ -325,6 +325,15 @@ class TestHash < Test::Unit::TestCase
end
end
def test_dup_equality
h = {'k' => 'v'}
assert_equal(h, h.dup)
h1 = {h => 1}
assert_equal(h1, h1.dup)
h[1] = 2
assert_equal(h1, h1.dup)
end
def test_each
count = 0
@cls[].each { |k, v| count + 1 }