From ed8b452e37322e66eb94dafa36f2b5da8f5ca44a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 29 Sep 2015 07:37:40 +0000 Subject: compile.c: fix performance of strconcat * compile.c (compile_dstr_fragments): fix performance by omitting the first empty string only for keeping literal encoding if other literals are too. [ruby-core:70930] [Bug #11556] * string.c (rb_str_append_literal): append but keep encoding non US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- insns.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'insns.def') diff --git a/insns.def b/insns.def index 7eb322120b..a923d3a4d6 100644 --- a/insns.def +++ b/insns.def @@ -370,7 +370,7 @@ concatstrings val = rb_str_resurrect(TOPN(i)); while (i-- > 0) { const VALUE v = TOPN(i); - rb_str_append(val, v); + rb_str_append_literal(val, v); } POPN(num); } -- cgit v1.2.3