Skip to content

Commit

Permalink
Small optimization to Match construction.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 10, 2012
1 parent fb0b115 commit dbf3478
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/Cursor.pm
Expand Up @@ -19,9 +19,8 @@ my class Cursor does NQPCursorRole {
my Mu $caphash := nqp::findmethod(Cursor, 'CAPHASH')(self);
my Mu $capiter := nqp::iterator($caphash);
while $capiter {
my Mu $pair := nqp::shift($capiter);
my str $key = $pair.key;
my Mu $value := $pair.value;
my str $key = nqp::shift_s($capiter);
my Mu $value := nqp::p6type(nqp::atkey($caphash, $key));
if $key eq '$!from' || $key eq '$!to' {
nqp::bindattr_i($match, Match, $key, $value.from);
}
Expand Down

0 comments on commit dbf3478

Please sign in to comment.