summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-30 12:42:41 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-30 12:42:41 +0000
commitdf878f78c5c53137f1fad3c494362b6d821f8dc1 (patch)
tree04e50575965b636ca630915d6b87914b4db5a4c5 /bootstraptest
parent5e85648b770f6999bc0020ddddfe0bcdbf5149c5 (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')
-rw-r--r--bootstraptest/test_method.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 8953a0d..2ce66f6 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"
+}