diff options
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" +} |