mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 10:33:58 +02:00
* 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:
parent
8f58f60643
commit
38c0b5f0e3
2 changed files with 14 additions and 0 deletions
|
@ -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>
|
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
|
* vm_insnhelper.c (vm_search_method): fix a build error that occurs
|
||||||
|
|
|
@ -325,6 +325,15 @@ class TestHash < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
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
|
def test_each
|
||||||
count = 0
|
count = 0
|
||||||
@cls[].each { |k, v| count + 1 }
|
@cls[].each { |k, v| count + 1 }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue