diff options
author | Jean Boussier <[email protected]> | 2025-02-24 14:42:09 +0100 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-02-24 18:32:46 +0100 |
commit | 97e6ad49a4604e7e4ca04da2aaafc63cbd5d29d8 () | |
tree | 3bd9dd77fbf8e1865ccfc3435e2d30c7573e81f0 /re.c | |
parent | 87f9c3c65e38fa3e5c6ef097e2cf63ff448f48d6 (diff) |
Reuse the backref if it isn't marked as busy.
[Misc #20652]
-rw-r--r-- | re.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1813,11 +1813,20 @@ rb_reg_search_set_match(VALUE re, VALUE str, long pos, int reverse, int set_back return ONIG_MISMATCH; } - VALUE match; - if (set_match && RTEST(*set_match)) { match = *set_match; } - else { match = match_alloc(rb_cMatch); } |