summaryrefslogtreecommitdiff
path: root/bootstraptest/test_proc.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-10 09:04:44 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-10 09:04:44 +0000
commit9cf9d5eaf7923498a3ece7f6757c9010aaa55e71 (patch)
treed7793be0098c6b916351a42a6f7bbed1bccb04ff /bootstraptest/test_proc.rb
parentb9a13f4962333f08338b9839d1bd9151665ac8aa (diff)
* vm_insnhelper.c (vm_throw): check a class frame.
Fixes Bug #4648. The patch is contributed by Kazuki Tsujimoto. * bootstraptest/test_proc.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_proc.rb')
-rw-r--r--bootstraptest/test_proc.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/bootstraptest/test_proc.rb b/bootstraptest/test_proc.rb
index 66acd5a..3d34700 100644
--- a/bootstraptest/test_proc.rb
+++ b/bootstraptest/test_proc.rb
@@ -429,3 +429,30 @@ assert_equal 'ok', %q{
raise "ok"
}
+assert_equal 'ok', %q{
+ lambda do
+ class A
+ class B
+ proc{return :ng}.call
+ end
+ end
+ end.call
+ :ok
+}
+
+assert_equal 'ok', %q{
+ $proc = proc{return}
+ begin
+ lambda do
+ class A
+ class B
+ $proc.call
+ end
+ end
+ end.call
+ :ng
+ rescue LocalJumpError
+ :ok
+ end
+}
+