summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_syntax.rb')
-rw-r--r--test/ruby/test_syntax.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index ce013583be..c135cec4ea 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -827,6 +827,11 @@ eom
end
end
+ def test_parenthesised_statement_argument
+ assert_syntax_error("foo(bar rescue nil)", /unexpected modifier_rescue/)
+ assert_valid_syntax("foo (bar rescue nil)")
+ end
+
private
def not_label(x) @result = x; @not_label ||= nil end