diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4079,7 +4079,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang) if (OBJ_TAINTED(val)) tainted = 1; - len = beg - offset; /* copy pre-match substr */ + len = beg0 - offset; /* copy pre-match substr */ if (len) { rb_enc_str_buf_cat(dest, cp, len, str_enc); } |