From 183d47b33ecbfb8d74a8ee06ec6af5922fbb4dee Mon Sep 17 00:00:00 2001 From: pmichaud Date: Mon, 24 May 2010 14:51:53 -0500 Subject: [PATCH] Only Regex;Cursor objects end up in the match captures -- others are silently skipped. --- src/Regex/Cursor.pir | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Regex/Cursor.pir b/src/Regex/Cursor.pir index f9ccfec..e171dfe 100644 --- a/src/Regex/Cursor.pir +++ b/src/Regex/Cursor.pir @@ -129,16 +129,12 @@ for the Cursor if one hasn't been created yet. unless cstack_it goto cstack_done .local pmc subcur, submatch, names subcur = shift cstack_it + $I0 = isa subcur, ['Regex';'Cursor'] + unless $I0 goto cstack_loop # If the subcursor isn't bound with a name, skip it names = getattribute subcur, '$!names' if null names goto cstack_loop - $I0 = isa subcur, ['Regex';'Cursor'] - unless $I0 goto cstack_1 submatch = subcur.'MATCH'() - goto cstack_2 - cstack_1: - submatch = subcur - cstack_2: # See if we have multiple binds .local pmc names_it subname = names