Fixed in https://github.com/rakudo/rakudo/commit/f6524e61e8
Tests added in https://github.com/perl6/roast/commit/391ecba7b9


On Wed Sep 28 06:02:48 2016, c...@zoffix.com wrote:
> # I have the fix; filing for records
> 
> The .subst-mutate routine returns a Match object (or Nil) on singular
> operations or a List of Match objects when :g/:global is used, as that
> produces several matches.
> 
> The :x option also produces several matches:
> 
> m: say "1234567".match: /\d/, :x(5)
> rakudo-moar c01fc3: OUTPUT«(「1」 「2」 「3」 「4」 「5」)␤
> 
> However, only a single match object is returned when that option is
> used with .subst-mutate, even though the option does have the desired
> effect on the substitutions:
> 
> m: my $x = "1234567"; say $x.subst-mutate: /\d/, '', :x(5); say $x
> rakudo-moar c01fc3: OUTPUT«「1」␤67␤»



Reply via email to