diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/codegen.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/t/codegen.rb b/test/t/codegen.rb index cb2e75f93..7177053ae 100644 --- a/test/t/codegen.rb +++ b/test/t/codegen.rb @@ -13,3 +13,21 @@ end assert('empty condition in ternary expression parses correctly') do assert_equal(() ? 1 : 2, 2) end + +assert('codegen absorbs arguments to redo and retry if they are the argument of a call') do + assert_nothing_raised do + a=*"1", case nil + when 1 + redo | + 1 + end + end + + assert_nothing_raised do + a=*"1", case nil + when 1 + retry | + 1 + end + end +end |
