diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-30 12:42:41 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-30 12:42:41 +0000 |
commit | df878f78c5c53137f1fad3c494362b6d821f8dc1 (patch) | |
tree | 04e50575965b636ca630915d6b87914b4db5a4c5 /bootstraptest/test_method.rb | |
parent | 5e85648b770f6999bc0020ddddfe0bcdbf5149c5 (diff) |
* compile.c (iseq_compile_each): fix stack consistency error.
[ruby-core:24611]
* bootstraptest/test_method.rb: add tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_method.rb')
-rw-r--r-- | bootstraptest/test_method.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb index 8953a0d4d1..2ce66f6a6a 100644 --- a/bootstraptest/test_method.rb +++ b/bootstraptest/test_method.rb @@ -1151,3 +1151,13 @@ assert_normal_exit %q{ e.message == "undefined method `lalala!' for \"a\":String" ? :ok : :ng end }, '[ruby-core:22298]' + +assert_equal 'ok', %q{ + "hello"[0] ||= "H" + "ok" +} + +assert_equal 'ok', %q{ + "hello"[0, 1] ||= "H" + "ok" +} |