diff options
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1496,6 +1496,10 @@ rb_reg_match_pos(re, str, pos) VALUE re, str; long pos; { + if (NIL_P(str)) { + rb_backref_set(Qnil); + return Qnil; + } StringValue(str); if (pos != 0) { if (pos < 0) { |