Skip to content

Commit

Permalink
Eliminate another ugly error message from substr.
Browse files Browse the repository at this point in the history
This time it was for using a code object that resulted in
an index too big for the string.
  • Loading branch information
colomon committed Feb 21, 2015
1 parent 022e452 commit 83072af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Str.pm
Expand Up @@ -1578,7 +1578,7 @@ sub substr(\what, \from, $chars?) {
}
elsif $from > $max {
X::OutOfRange.new(
:what<Start of substr>,:got(from),:range("0..$max"),
:what<Start of substr>,:got($from),:range("0..$max"),
).fail;
}

Expand Down

0 comments on commit 83072af

Please sign in to comment.