Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Escape chars in X::Str::Numeric indicator.
Fixes RT #125335.
  • Loading branch information
jnthn committed Jun 29, 2015
1 parent 4bcbc74 commit 1478dc0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/Exception.pm
Expand Up @@ -1410,11 +1410,12 @@ my class X::Str::Numeric is Exception {
has $.pos;
has $.reason;
method source-indicator {
constant marker = chr(0x23CF);
my constant marker = chr(0x23CF);
my sub escape($str) { $str.perl.substr(1).chop }
join '', "in '",
substr($.source,0, $.pos),
escape(substr($.source,0, $.pos)),
marker,
substr($.source,$.pos),
escape(substr($.source,$.pos)),
"' (indicated by ",
marker,
")",
Expand Down

0 comments on commit 1478dc0

Please sign in to comment.