diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_syntax.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 3638d83e2b..a64591ecec 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -2021,6 +2021,15 @@ eom assert_valid_syntax("tap {a = (true ? true : break)}") assert_valid_syntax("tap {a = (break if false)}") assert_valid_syntax("tap {a = (break unless true)}") + + assert_syntax_error("#{<<~"{#"}\n#{<<~'};'}", /void value expression/, nil, "#{BUG_21669} 1.4") + {# + x = if rand < 0.5 + return + else + return + end + }; end def test_value_expr_in_singleton |
