diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-19 02:46:02 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-19 02:46:02 +0000 |
| commit | 92fe5b66348ab6071b5cd8cdb10ba15c513485df (patch) | |
| tree | 23b44f107b689200bd77efb32606455f56e65529 /bootstraptest | |
| parent | e4380c59f5ba9ac0bf27cb65cdde980f168e3b94 (diff) | |
| download | ruby-92fe5b66348ab6071b5cd8cdb10ba15c513485df.tar.gz ruby-92fe5b66348ab6071b5cd8cdb10ba15c513485df.tar.xz ruby-92fe5b66348ab6071b5cd8cdb10ba15c513485df.zip | |
* vm_insnhelper.c (vm_throw): fix "return" process from "lambda".
* bootstraptest/test_proc.rb: add a test.
* bootstraptest/pending.rb: add a pending bug.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
| -rw-r--r-- | bootstraptest/pending.rb | 17 | ||||
| -rw-r--r-- | bootstraptest/test_proc.rb | 14 |
2 files changed, 31 insertions, 0 deletions
diff --git a/bootstraptest/pending.rb b/bootstraptest/pending.rb index 30c241619..b894fb6b0 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 1ffd5c08a..f384ba351 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() +} + |
