1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/ruby/test_optimization.rb (test_hash_aset_with): assert assignment

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2014-10-14 21:52:45 +00:00
parent f9deff9759
commit 5733a57455
2 changed files with 6 additions and 1 deletions

View file

@ -164,7 +164,7 @@ class TestRubyOptimization < Test::Unit::TestCase
assert_equal 1, h["foo"] = 1
assert_redefine_method('Hash', '[]=', <<-end)
h = {}
h["foo"] = 1
assert_equal 1, h["foo"] = 1, "assignment always returns value set"
assert_nil h["foo"]
end
end