diff options
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2856,13 +2856,10 @@ rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp) } } + if (!val) return str; if (p < e) { - if (!val) { - val = rb_str_buf_new(e-p); - } rb_str_buf_cat(val, p, e-p); } - if (!val) return str; rb_enc_associate(val, enc); return val; |