summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/pending.rb17
-rw-r--r--bootstraptest/test_proc.rb14
2 files changed, 31 insertions, 0 deletions
diff --git a/bootstraptest/pending.rb b/bootstraptest/pending.rb
index 30c241619f..b894fb6b04 100644
--- a/bootstraptest/pending.rb
+++ b/bootstraptest/pending.rb
@@ -13,3 +13,20 @@ assert_equal 'A', %q{
B.new.a = 'B'
A.new.a
}, '[ruby-core:17019]'
+
+assert_equal 'ok', %q{
+ def m
+ lambda{
+ proc{
+ return :ng1
+ }
+ }.call.call
+ :ng2
+ end
+
+ begin
+ m()
+ rescue LocalJumpError
+ :ok
+ end
+}
diff --git a/bootstraptest/test_proc.rb b/bootstraptest/test_proc.rb
index 1ffd5c08ac..f384ba3510 100644
--- a/bootstraptest/test_proc.rb
+++ b/bootstraptest/test_proc.rb
@@ -364,3 +364,17 @@ assert_equal 'ok', %q{
def12
$x
}, '[ruby-core:17164]'
+
+assert_equal 'ok', %q{
+ def m
+ pr = proc{
+ proc{
+ return :ok
+ }
+ }.call
+ pr.call
+ :ng
+ end
+ m()
+}
+