From df878f78c5c53137f1fad3c494362b6d821f8dc1 Mon Sep 17 00:00:00 2001 From: mame Date: Thu, 30 Jul 2009 12:42:41 +0000 Subject: * 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 --- bootstraptest/test_method.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bootstraptest/test_method.rb') 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" +} -- cgit v1.2.3