Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
let Str.match return a List properly
  • Loading branch information
FROGGS committed Aug 26, 2015
1 parent 5198e7a commit 778b1fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/Str.pm
Expand Up @@ -726,7 +726,14 @@ my class Str does Stringy { # declared in BOOTSTRAP
$samecase,
$samespace,
);
$global ?? (@matches,).list !! @matches[0];
if $global {
my \result := List.CREATE;
nqp::bindattr(result, List, '$!reified', nqp::getattr(@matches, List, '$!reified'));
result
}
else {
@matches[0]
}
}
}

Expand Down

0 comments on commit 778b1fb

Please sign in to comment.