Re: [perl #128039] [BUG] Misleading suggestion in .substr error message for positive index values in Rakudo

2016-04-30 Thread Elizabeth Mattijsen
Fixed with d7698f3de2eb3c326aa ,  tests needed.

> On 30 Apr 2016, at 17:02, Carl Mäsak (via RT)  
> wrote:
> 
> # New Ticket Created by  "Carl Mäsak" 
> # Please include the string:  [perl #128039]
> # in the subject line of all future correspondence about this issue. 
> # https://rt.perl.org/Ticket/Display.html?id=128039 >
> 
> 
>  m: ''.substr(5).say
>  rakudo-moar 1acf80: OUTPUT«(HANDLED) Start argument to
> substr out of range. Is: 5, should be in 0..0; use *5 if you want to
> index relative to the end [...]
>  the *5 is a bug
> * masak submits rakudobug
>  m: say "a".substr(7)
>  rakudo-moar 1acf80: OUTPUT«(HANDLED) Start argument to
> substr out of range. Is: 7, should be in 0..1; use *7 if you want to
> index relative to the end [...]



[perl #128039] [BUG] Misleading suggestion in .substr error message for positive index values in Rakudo

2016-04-30 Thread Carl Mäsak
# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #128039]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=128039 >


 m: ''.substr(5).say
 rakudo-moar 1acf80: OUTPUT«(HANDLED) Start argument to
substr out of range. Is: 5, should be in 0..0; use *5 if you want to
index relative to the end [...]
 the *5 is a bug
* masak submits rakudobug
 m: say "a".substr(7)
 rakudo-moar 1acf80: OUTPUT«(HANDLED) Start argument to
substr out of range. Is: 7, should be in 0..1; use *7 if you want to
index relative to the end [...]