# New Ticket Created by Zoffix Znet
# Please include the string: [perl #129374]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=129374 >
# 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.