On Thu, 05 Nov 2015 01:58:17 -0800, sml...@gmail.com wrote:
> This works:
> 
> ➜ .pick xx 10 given 1..6
> (6 3 1 1 5 1 6 3 4 2)
> 
> But putting parens around the xx operation, breaks it:
> 
> ➜ (.pick xx 10) given 1..6
> ((Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any))
> 
> The problem only seem to occur when $_ was set by a statement modifier
> - not when it was assigned to manually or set by the block form of
> 'given'.
> 
> An example of a useful idiom which relies on putting parens around an
> xx operation, is
>     (EXPRESSION xx *).first(CONSTRAINT)
> for "keep retrying EXPRESSION until the result matches CONSTRAINT".


Thank you for the report. This is now fixed.

Fix:  https://github.com/rakudo/rakudo/commit/1ee89b54074e80c
Test: https://github.com/perl6/roast/commit/2f2998733a2d8132c

Reply via email to