On Sun Jul 24 02:17:20 2011, masak wrote: > <masak> I found a bug. :) > <masak> rakudo: subset Foo of Str where any(<foo bar>); for <foo OH > NOES> { when Foo { say "$_ is a Foo" } } # this is fine > <p6eval> rakudo 922500: OUTPUT«foo is a Foo» > <masak> rakudo: my @strings = <foo bar>; subset Foo of Str where > any(@strings); for <foo OH NOES> { when Foo { say "$_ is a Foo" } } # > OH NOES > <p6eval> rakudo 922500: OUTPUT«foo is a FooOH is a FooNOES is a Foo» > * masak submits rakudobug > <masak> rakudo: my @strings = <foo bar>; subset Foo of Str where { say > @strings.perl; $_ ~~ any(@strings) }; for <foo OH NOES> { when Foo { > say "$_ is a Foo" } } > <p6eval> rakudo 922500: OUTPUT«Null PMC access in find_method('perl') [...] > <masak> ah; it's the ol' "scope has wrong outer" bug again. > <masak> I'll submit it anyway because the use case might be worth > having a test for. someone who finds the old ticket, if any, is free > to merge.
<masak> rakudo: my @strings = <foo bar>; subset Foo of Str where { $_ ~~ any(@strings) }; for <foo OH NOES> { when Foo { say "$_ is a Foo" } } <p6eval> rakudo 3c6296: OUTPUT«foo is a Foo» <masak> \o/ * masak marks https://rt.perl.org/rt3/Ticket/Display.html?id=95500 fixed <masak> will simplify the crypt game a bit ;) Just needs a test in roast -- if it doesn't already have one -- and then this ticket can be closed.