Skip to content

Commit

Permalink
Match objects should have the cursor associated with them.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jan 7, 2012
1 parent 3efe24b commit 5d63533
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/QRegex/Cursor.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ class NQPCursor does NQPCursorRole {
unless pir::isa($match, 'Hash') || nqp::istype($match, NQPMatch) {
$match := NQPMatch.new();
nqp::bindattr(self, NQPCursor, '$!match', $match);
nqp::bindattr($match, NQPMatch, '$!cursor', self);
nqp::bindattr($match, NQPMatch, '$!orig', nqp::getattr(self, NQPCursor, '$!orig'));
nqp::bindattr_i($match, NQPMatch, '$!from', nqp::getattr_i(self, NQPCursor, '$!from'));
nqp::bindattr_i($match, NQPMatch, '$!to', nqp::getattr_i(self, NQPCursor, '$!pos'));
Expand Down

0 comments on commit 5d63533

Please sign in to comment.