On Tue, Apr 03, 2012 at 09:22:11PM +0200, Moritz Lenz wrote:
> On 04/03/2012 06:44 PM, Patrick R. Michaud via RT wrote:
> > On Tue Apr 03 01:24:47 2012, moritz wrote:
> >> 10:23 < timotimo> r: say "foo"[1..*]
> >> 10:23 <+p6eval> rakudo 8ead1e: OUTPUT«Method 'gimme' not found for 
> >> invocant of
> >>                  class 'Str'␤  in method postcircumfix:<[ ]> at
> >>                  src/gen/CORE.setting:1147␤  in block <anon> at
> >>                  /tmp/1ZiRf7yMZW:1␤␤»
> > 
> > 
> > Now fixed in 1bbf9eb, needs spectests to close ticket.
> 
> Now we have "foo"[2] fail(), but "foo"[2..*] returns the empty Parcel.
> Is that the intended behavior?

Since "foo" acts like a list of one element, I suspect that .[2..*]
should act the same as when used on an array of one element, which
results in an empty Parcel:

    my @array = "foo";
    say @array[2..*].elems;   # 0
    say "foo"[2..*].elems;   # 0

If that's wrong, we need better spectests to get the correct
behavior.

Pm

Reply via email to