diff options
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1912,6 +1912,7 @@ match_captures(VALUE match) static int name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name, const char* name_end) { + if (NIL_P(regexp)) return -1; return onig_name_to_backref_number(RREGEXP_PTR(regexp), (const unsigned char *)name, (const unsigned char *)name_end, regs); } |