diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-29 05:06:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-29 05:06:32 +0000 |
commit | dd2016298d030d60b0790ea1c2a16e9ab93ee847 (patch) | |
tree | 87be960315b0fb03368393169e7c8df19d26ab7b | |
parent | ec621fe70f8632d050a2ed17fe471c29470a3083 (diff) | |
download | ruby-dd2016298d030d60b0790ea1c2a16e9ab93ee847.tar.gz |
test_hash.rb: add assertions
* test/ruby/test_hash.rb (test_wrapper_of_special_const): test
other special obejcts. [Bug #9381]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_hash.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index f6046cb428..688dc8689a 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -1279,8 +1279,13 @@ class TestHash < Test::Unit::TestCase end end - hash = {5 => bug9381} - assert_equal(bug9381, hash[wrapper.new(5)]) + bad = [ + 5, true, false, nil, + ].select do |x| + hash = {x => bug9381} + hash[wrapper.new(x)] != bug9381 + end + assert_empty(bad, bug9381) end def test_label_syntax |