From af05335cd830306283bb40df86b7a8dc0af2aba3 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 4 Feb 2016 06:35:34 +0000 Subject: 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 --- re.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 're.c') diff --git a/re.c b/re.c index 4036df2910..46526af9a8 100644 --- a/re.c +++ b/re.c @@ -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; } -- cgit v1.2.3