[MacRuby] #939: $1, $2 ... should store the value of local scope.
MacRuby
ruby-noreply at macosforge.org
Thu Oct 7 20:05:55 PDT 2010
#939: $1, $2 ... should store the value of local scope.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Comment(by lsansonetti@…):
Okay, this is really evil.
{{{
$ ./miniruby -e 'def foo; "omg".match(/^(.)/); end; "wtf".match(/^(.)/);
foo; p $1'
"o"
$ ruby -e 'def foo; "omg".match(/^(.)/); end; "wtf".match(/^(.)/); foo; p
$1'
"w"
}}}
{{{
$ ./miniruby -e 'def foo; "omg".match(/^(.)/); end; foo; p $1'
"o"
$ ruby -e 'def foo; "omg".match(/^(.)/); end; foo; p $1'
nil
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/939#comment:1>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list