Fixed in https://github.com/rakudo/rakudo/commit/6ef4cdf543 Tests added in https://github.com/perl6/roast/commit/925cf4bd8b
On Tue Sep 27 11:39:00 2016, c...@zoffix.com wrote: > # I have the fix; filing for records > > The .subst/.subst-mutate methods slurp several of their options into a > hash and then pass those > along to Str.match call. The logic that handles the result of that > call, however, does not > pay attention to Failures. Specifically, failures resulting from > incorrect values provided for > the named arguments that get passed to .match: > > m: say 'foo'.subst: /\w/, '', :x{2} > rakudo-moar 222d16: OUTPUT«foo» > m: say 'foo'.subst: /\w/, '', :th(2.5) > rakudo-moar 222d16: OUTPUT«foo» > m: say ($ = 'foo').subst-mutate: /\w/, '', :th(2.5) > rakudo-moar 222d16: OUTPUT«Nil» > > Thus, the user never receives any indication they're using the wrong > arguments and the code behaves as the match simply fails.