summaryrefslogtreecommitdiffhomepage
path: root/test/t/syntax.rb
diff options
context:
space:
mode:
authorksss <[email protected]>2016-07-14 10:28:11 +0900
committerksss <[email protected]>2016-07-14 13:03:25 +0900
commit9dc820590f226e5d30c04af7eedb3dff9f5c16e7 (patch)
tree450757bdd4532bd32e2d5d6c8d6337099c06bc13 /test/t/syntax.rb
parentd4d807b774de0e776d2749acbcb22a1b38f1c50b (diff)
downloadmruby-9dc820590f226e5d30c04af7eedb3dff9f5c16e7.tar.gz
mruby-9dc820590f226e5d30c04af7eedb3dff9f5c16e7.zip
Should raise LocalJumpError when no block given
Diffstat (limited to 'test/t/syntax.rb')
-rw-r--r--test/t/syntax.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb
index 4ba171f9a..25ae09828 100644
--- a/test/t/syntax.rb
+++ b/test/t/syntax.rb
@@ -38,6 +38,13 @@ assert('yield', '11.3.5') do
assert_raise LocalJumpError do
yield
end
+ assert_raise LocalJumpError do
+ o = Object.new
+ def o.foo
+ yield
+ end
+ o.foo
+ end
end
assert('Abbreviated variable assignment', '11.4.2.3.2') do