Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Return :skip-empty to previous semantics
  • Loading branch information
lizmat committed Nov 5, 2015
1 parent 9fad7b4 commit 3eb2460
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/core/Str.pm
Expand Up @@ -1071,10 +1071,9 @@ my class Str does Stringy { # declared in BOOTSTRAP
$from = nqp::getattr($pair,Pair,'$!key');
if nqp::isge_i($from,$pos) { # not hidden by other needle
my int $needle-index = nqp::getattr($pair,Pair,'$!value');
unless $skip && nqp::iseq_i($from,$pos) {
nqp::push($result,nqp::substr($str,$pos,$from - $pos));
nqp::push($result,$needle-index);
}
nqp::push($result,nqp::substr($str,$pos,$from - $pos))
unless $skip && nqp::iseq_i($from,$pos);
nqp::push($result,$needle-index);
$pos = $from + nqp::atpos($needle-chars,$needle-index);
}
}
Expand All @@ -1085,10 +1084,9 @@ my class Str does Stringy { # declared in BOOTSTRAP
$from = nqp::getattr($pair,Pair,'$!key');
if nqp::isge_i($from,$pos) { # not hidden by other needle
my int $needle-index = nqp::getattr($pair,Pair,'$!value');
unless $skip && nqp::iseq_i($from,$pos) {
nqp::push($result,nqp::substr($str,$pos,$from - $pos));
nqp::push($result,nqp::atpos($needles,$needle-index));
}
nqp::push($result,nqp::substr($str,$pos,$from - $pos))
unless $skip && nqp::iseq_i($from,$pos);
nqp::push($result,nqp::atpos($needles,$needle-index));
$pos = $from + nqp::atpos($needle-chars,$needle-index);
}
}
Expand Down

0 comments on commit 3eb2460

Please sign in to comment.