[MacRuby] #800: MacRuby throws an exception of "LocalJumpError" when use the `yield' in Proc.
MacRuby
ruby-noreply at macosforge.org
Sat Dec 4 15:59:33 PST 2010
#800: MacRuby throws an exception of "LocalJumpError" when use the `yield' in
Proc.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords: #reduction
----------------------------------+-----------------------------------------
Changes (by mattaimonetti@…):
* keywords: => #reduction
Old description:
> Test Script:
> {{{
> #!ruby
> $ cat test_proc_3.rb
> def m
> a = 1
> m2 {
> a
> }
> end
>
> def m2
> b = 2
> Proc.new {
> [yield, b]
> }
> end
>
> p m.call # => expected "[1, 2]"
> }}}
>
> Result of Ruby 1.9.1:
> {{{
> $ ruby test_proc_3.rb
> [1, 2]
> }}}
>
> Result of MacRuby Trunk:
> {{{
> $ macruby test_proc_3.rb
> no block given (LocalJumpError)
> }}}
New description:
''''Test Script:
{{{
#!ruby
$ cat test_proc_3.rb
def m
a = 1
m2 {
a
}
end
def m2
b = 2
Proc.new {
[yield, b]
}
end
p m.call # => expected "[1, 2]"
}}}
Result of Ruby 1.9.1:
{{{
$ ruby test_proc_3.rb
[1, 2]
}}}
Result of MacRuby Trunk:
{{{
$ macruby test_proc_3.rb
no block given (LocalJumpError)
}}}
--
Comment:
confirmed in today's build
--
Ticket URL: <http://www.macruby.org/trac/ticket/800#comment:1>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list