# New Ticket Created by  Jan-Olof Hendig 
# Please include the string:  [perl #130664]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=130664 >


# Tested with

dogbert@dogbert-VirtualBox ~/.rakudobrew/moar-nom $ perl6 -v
This is Rakudo version 2016.08.1-155-gccecbfe built on MoarVM version
2016.08-43-g3d04391
implementing Perl 6.c.

# the first problem

dogbert@dogbert-VirtualBox ~/.rakudobrew/moar-nom $ perl6 -e 'say
"1234".rindex("2", -1)'
Position in rindex out of range. Is: -1, should be in 0..4
  in block <unit> at -e line 1

Actually thrown at:
  in block <unit> at -e line 1

# the position given *IS* out of range but the suggestion given, i.e.
"should be in 0..4" is incorrect since the string only contains four chars
# let us test the suggestion and use 4 as the position

dogbert@dogbert-VirtualBox ~/.rakudobrew/moar-nom $ perl6 -e 'say
"1234".rindex("2", 4)'
index start offset out of range
  in block <unit> at -e line 1

# this also failed but this time we got no extra information, i.e. "Position
in rindex out of range. Bla bla"
# according to timo this could possibly point to a problem in MoarVM

See http://irclog.perlgeek.de/perl6/2016-09-10#i_13185974 

/dogbert17

Reply via email to