We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f75964 commit 96c2411Copy full SHA for 96c2411
src/QRegex/Cursor.nqp
@@ -642,8 +642,10 @@ role NQPMatchRole is export {
642
643
method !reduce(str $name) {
644
my $actions := self.actions;
645
- nqp::findmethod($actions, $name)($actions, self.MATCH)
646
- if !nqp::isnull($actions) && nqp::can($actions, $name);
+ my $method := nqp::isnull($actions)
+ ?? nqp::null()
647
+ !! nqp::tryfindmethod($actions, $name);
648
+ $method($actions, self.MATCH) unless nqp::isnull($method);
649
self;
650
}
651
0 commit comments