diff options
Diffstat (limited to 'bootstraptest/test_yjit.rb')
-rw-r--r-- | bootstraptest/test_yjit.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 5bf415889e..51c82b55b5 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -1021,3 +1021,17 @@ assert_equal 'foo123', %q{ make_str("foo", 123) make_str("foo", 123) } + +# getlocal with 2 levels +assert_equal '7', %q{ + def foo(foo, bar) + while foo > 0 + while bar > 0 + return foo + bar + end + end + end + + foo(5,2) + foo(5,2) +} |