parent
87f9c3c65e
commit
97e6ad49a4
15
re.c
15
re.c
@ -1813,11 +1813,20 @@ rb_reg_search_set_match(VALUE re, VALUE str, long pos, int reverse, int set_back
|
|||||||
return ONIG_MISMATCH;
|
return ONIG_MISMATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
VALUE match;
|
VALUE match = Qnil;
|
||||||
if (set_match && RTEST(*set_match)) {
|
if (set_match) {
|
||||||
match = *set_match;
|
match = *set_match;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
|
if (NIL_P(match)) {
|
||||||
|
match = rb_backref_get();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!NIL_P(match) && FL_TEST(match, MATCH_BUSY)) {
|
||||||
|
match = Qnil;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NIL_P(match)) {
|
||||||
match = match_alloc(rb_cMatch);
|
match = match_alloc(rb_cMatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user