Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for RT #128039
  • Loading branch information
lizmat committed Apr 30, 2016
1 parent b939c4e commit d7698f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/Buf.pm
Expand Up @@ -141,7 +141,7 @@ my role Blob[::T = uint8] does Positional[T] does Stringy is repr('VMArray') is
what => 'From argument to subbuf',
got => $from.gist,
range => "0..$elems",
comment => "use *{$pos} if you want to index relative to the end",
comment => "use *-{abs $pos} if you want to index relative to the end",
).fail if $pos < 0;
X::OutOfRange.new(
what => 'From argument to subbuf',
Expand Down
4 changes: 2 additions & 2 deletions src/core/Rakudo/Internals.pm
Expand Up @@ -621,15 +621,15 @@ my class Rakudo::Internals {
:range("0.." ~ max),
:comment( nqp::istype(from, Callable) || -from > max
?? ''
!! "use *{from} if you want to index relative to the end"),
!! "use *-{abs from} if you want to index relative to the end"),
);
}
method SUBSTR-CHARS-OOR(\chars) {
X::OutOfRange.new(
:what('Number of characters argument to substr'),
:got(chars.gist),
:range("0..Inf"),
:comment("use *{chars} if you want to index relative to the end"),
:comment("use *-{abs chars} if you want to index relative to the end"),
);
}
method SUBSTR-SANITY(Str \what, $start, $want, \from, \chars) {
Expand Down

0 comments on commit d7698f3

Please sign in to comment.