Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Store decont'd $!orig in Cursor.
Otherwise, things like "$a = $a ~~ /./" will end up with trying to
substr(.orig, ...) when looking at the Match object, which now is
pointing to the Match itself rather than the original string.
  • Loading branch information
jnthn committed Sep 14, 2015
1 parent 7a04389 commit 989fde6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/QRegex/Cursor.nqp
Expand Up @@ -120,7 +120,7 @@ role NQPCursorRole is export {
unless $shared {
$shared := nqp::create(ParseShared);
nqp::bindattr($shared, ParseShared, '$!CUR_CLASS', $?CLASS);
nqp::bindattr($shared, ParseShared, '$!orig', $orig);
nqp::bindattr($shared, ParseShared, '$!orig', nqp::decont($orig));
nqp::bindattr_s($shared, ParseShared, '$!target',
#?if parrot
pir::trans_encoding__Ssi($orig, pir::find_encoding__Is('ucs4')));
Expand Down

0 comments on commit 989fde6

Please sign in to comment.