summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/syntax.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb
index fac73aa7b..d761b1991 100644
--- a/test/t/syntax.rb
+++ b/test/t/syntax.rb
@@ -254,3 +254,14 @@ assert('External command execution.') do
end
true
end
+
+assert('parenthesed do-block in cmdarg') do
+ class ParenDoBlockCmdArg
+ def test(block)
+ block.call
+ end
+ end
+ x = ParenDoBlockCmdArg.new
+ result = x.test (proc do :ok; end)
+ assert_equal :ok, result
+end