diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-27 13:30:00 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-27 13:30:00 +0000 |
commit | 5ec61453c5012088ee9719925ad1937a0bc61102 (patch) | |
tree | b3a25167a169d162e16b87321a05826c58520b43 /sample | |
parent | 3e1e60d6ac383cff228546bf48d4ccdc8d3dd6f8 (diff) | |
download | ruby-5ec61453c5012088ee9719925ad1937a0bc61102.tar.gz ruby-5ec61453c5012088ee9719925ad1937a0bc61102.tar.xz ruby-5ec61453c5012088ee9719925ad1937a0bc61102.zip |
* eval.c (proc_invoke): no orphan block check is needed when pcall
is true.
* eval.c (localjump_destination): update localjump condition.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r-- | sample/test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index 65cfcad47..d37c97877 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1127,6 +1127,17 @@ test_ok(lambda{|a|}.arity == 1) test_ok(lambda{|a,|}.arity == 1) test_ok(lambda{|a,b|}.arity == 2) +def yield_in_lambda + lambda{ yield }[] +end + +def return_in_lambda + yield_in_lambda{ return true } + false +end + +test_ok(return_in_lambda()) + def marity_test(m) method = method(m) test_ok(method.arity == method.to_proc.arity) |