[MacRuby-devel] [MacRuby] #798: Processing after Proc is not executed when use Proc in lambda, and when calls `return' in Proc.
MacRuby
ruby-noreply at macosforge.org
Fri Jul 16 09:16:40 PDT 2010
#798: Processing after Proc is not executed when use Proc in lambda, and when
calls `return' in Proc.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Test Script:
{{{
$ cat test_proc.rb
def test_lambda_lambda
lambda {
lambda {
return
}.call
}.call
p "test_lambda_lambda"
:ok
end
def test_lambda_proc
lambda {
Proc.new {
return
}.call
}.call
p "test_lambda_proc"
:ok
end
def test_proc_proc
Proc.new {
Proc.new {
return
}.call
}.call
p "test_proc_proc"
:ng
end
p test_lambda_lambda
p test_lambda_proc
p test_proc_proc
}}}
Result of Ruby 1.9.1:
{{{
$ ruby test_proc.rb
"test_lambda_lambda"
:ok
"test_lambda_proc"
:ok
nil
}}}
Result of MacRuby Trunk:
{{{
$ macruby test_proc.rb
"test_lambda_lambda"
:ok
nil
nil
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/798>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list