-
-
Save MasterDuke17/c9512590df63bd530b640464ad04103f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Match.pm b/src/core/Match.pm | |
index f8792197f..5b814c9eb 100644 | |
--- a/src/core/Match.pm | |
+++ b/src/core/Match.pm | |
@@ -326,7 +326,15 @@ my class Match is Capture is Cool does NQPMatchRole { | |
# no modifier, match literally | |
elsif $nomod { | |
- $match = nqp::eqat($tgt, $topic_str, $pos); | |
+ my int $index = nqp::index($tgt, $topic_str, $pos); | |
+ if $index >= 0 { | |
+ nqp::bindattr_i($cur, $?CLASS, '$!from', $index); | |
+ $pos = $index; | |
+ $match = 1; | |
+ } | |
+ else { | |
+ $match = 0; | |
+ } | |
} | |
# ignoremark+ignorecase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment