diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-04 06:46:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-04 06:46:28 +0000 |
commit | 09c911089695725e33be49905afa46e8b9e0e0b6 (patch) | |
tree | 88a45741fd84cfac9dd27482c7addac31e3aea34 /re.c | |
parent | 25fd278459d5862383ad55493e082257254d64ab (diff) |
revert re.c in r53736
* re.c (rb_reg_initialize): must copy the source string content,
it is not a static literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2580,7 +2580,7 @@ rb_reg_initialize(VALUE obj, const char *s, long len, rb_encoding *enc, options & ARG_REG_OPTION_MASK, err, sourcefile, sourceline); if (!re->ptr) return -1; - RB_OBJ_WRITE(obj, &re->src, rb_fstring_enc_new(s, len, enc)); + RB_OBJ_WRITE(obj, &re->src, rb_fstring(rb_enc_str_new(s, len, enc))); RB_GC_GUARD(unescaped); return 0; } |