Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Str.samespace (and with it ss///)
  • Loading branch information
Mouq committed Apr 13, 2014
1 parent e498597 commit e13671e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Str.pm
Expand Up @@ -769,8 +769,8 @@ my class Str does Stringy { # declared in BOOTSTRAP
}

method samespace(Str:D: Str:D $pat) {
my @self-chunks = self.split(rx/\s+/, :all);
my @pat-chunks := $pat.split(rx/\s+/, :all);
my @self-chunks = self.split(rx/\s+/, :all).flat;
my @pat-chunks := $pat.split(rx/\s+/, :all).flat;
loop (my $i = 1; $i < @pat-chunks && $i < @self-chunks; $i += 2) {
@self-chunks[$i] = @pat-chunks[$i];
}
Expand Down

0 comments on commit e13671e

Please sign in to comment.