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 | 51f3f3219cf538a1fddbfcdd9b07c7fbceb90cfe (patch) | |
tree | 88a45741fd84cfac9dd27482c7addac31e3aea34 /re.c | |
parent | 54490af01ba605d3b2326bc16b9c31085b97f1ea (diff) | |
download | ruby-51f3f3219cf538a1fddbfcdd9b07c7fbceb90cfe.tar.gz |
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; } |