[perl #130725] [REGRESSION] (gather foo()).rotor($n, :partial) broken by fd8df7f2ad

2017-02-10 Thread Zoffix Znet via RT
On Mon, 06 Feb 2017 04:04:16 -0800, consult...@jnthn.net wrote:
> Discovered this after some $dayjob code got busted by updating Rakudo.
> After bisecting, I got it down to this commit:
> 
> https://github.com/rakudo/rakudo/commit/fd8df7f2ad509689a64b8825e1c4bb622cf7486f
> 
> And from that thankfully could reduced the bug from the couple of
> thousand
> line app to the following code:
> 
> 11:50 < jnthn> m: sub foo() { for ^20 { take 'x' } }; for (gather
>foo()).rotor(3, :partial) { .say }
> 11:50 <+camelia> rakudo-moar c0a907: OUTPUT«(x x x)␤(x x x)␤(x x x)␤(x
> x
> x)␤(x
>  x x)␤(x x x)␤(x x)␤Cannot invoke this object (REPR:
>  Uninstantiable; Callable)␤  in block  at 
> line
> 1␤␤»
> 
> Note that putting a .list back in fixes it:
> 
> 11:50 < jnthn> m: sub foo() { for ^20 { take 'x' } }; for (gather
>foo()).list.rotor(3, :partial) { .say }
> 11:50 <+camelia> rakudo-moar c0a907: OUTPUT«(x x x)␤(x x x)␤(x x x)␤(x
> x
> x)␤(x
>  x x)␤(x x x)␤(x x)␤»
> 
> Bisectable also pointed to the same commit for this code, so it seems
> that's the culprit.

Thank you for the report. This is now fixed.

Fix: https://github.com/rakudo/rakudo/commit/bcd902a43e
Test: https://github.com/perl6/roast/commit/52668af6c5


[perl #130725] [REGRESSION] (gather foo()).rotor($n, :partial) broken by fd8df7f2ad

2017-02-09 Thread via RT
# New Ticket Created by  Jonathan Worthington 
# Please include the string:  [perl #130725]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130725 >


Discovered this after some $dayjob code got busted by updating Rakudo.
After bisecting, I got it down to this commit:

https://github.com/rakudo/rakudo/commit/fd8df7f2ad509689a64b8825e1c4bb622cf7486f

And from that thankfully could reduced the bug from the couple of thousand
line app to the following code:

11:50 < jnthn> m: sub foo() { for ^20 { take 'x' } }; for (gather
   foo()).rotor(3, :partial) { .say }
11:50 <+camelia> rakudo-moar c0a907: OUTPUT«(x x x)␤(x x x)␤(x x x)␤(x x
x)␤(x
 x x)␤(x x x)␤(x x)␤Cannot invoke this object (REPR:
 Uninstantiable; Callable)␤  in block  at  line
1␤␤»

Note that putting a .list back in fixes it:

11:50 < jnthn> m: sub foo() { for ^20 { take 'x' } }; for (gather
   foo()).list.rotor(3, :partial) { .say }
11:50 <+camelia> rakudo-moar c0a907: OUTPUT«(x x x)␤(x x x)␤(x x x)␤(x x
x)␤(x
 x x)␤(x x x)␤(x x)␤»

Bisectable also pointed to the same commit for this code, so it seems
that's the culprit.