diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-04 06:35:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-04 06:35:34 +0000 |
commit | 94c70c7d724870baf4a6eb108200128b7319c4ea (patch) | |
tree | ba5a5d2242859dcb2a9831573ef07ee81d4b41d9 /re.c | |
parent | 10ff672a30e9195baf1240abd301b74af040fbe2 (diff) | |
download | bundler-94c70c7d724870baf4a6eb108200128b7319c4ea.tar.gz |
fstring_enc_new
* string.c (rb_fstring_enc_new, rb_fstring_enc_cstr): functions to
make fstring with encoding.
* re.c (rb_reg_initialize): make fstring without copying.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53736 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(rb_enc_str_new(s, len, enc))); + RB_OBJ_WRITE(obj, &re->src, rb_fstring_enc_new(s, len, enc)); RB_GC_GUARD(unescaped); return 0; } |