You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<tylercurtis> Actually, maybe { /O/ } should be -> $_? { /O/ }
<masak> it is.
<masak> rakudo: my $b = { /O/ }; say $b.signature.count; say $b.signature.arity
<p6eval> rakudo 377615: OUTPUT«10»
<jnthn> I'ts more like -> $_ = $OUTER::_ I guess
<masak> fair enuf.
<tylercurtis> Well, yes, that.
<masak> OUTER, and not CALLER?
<masak> rakudo: my $b; { $_ = 5; $b = { .say } }; $_ = 42; $b()
<p6eval> rakudo 377615: OUTPUT«42»
<masak> seems to me $_ defaults to $CALLER::_
* masak submits rakudobug
<tylercurtis> How does that distinguish between $OUTER::_ and
$CALLER::_? The calling scope is the same as the outer scope, no?
<masak> no, the outer scope has $_ = 5, but the calling scope has $_ = 42
<jnthn> rakudo: my $b; { my $_ = 5; $b = { .say } }; $_ = 42; $b()
<p6eval> rakudo 377615: OUTPUT«5»
jnthn says that the problem is that there's a binding to the outer
container rather than an assignment, and that the last evaluation
shows this.
Migrated from rt.perl.org#78278 (status was 'open')
Searchable as RT78278$
The text was updated successfully, but these errors were encountered: