diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-29 07:37:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-29 07:37:40 +0000 |
commit | a9df34cd05d9f88466c52364780f0e40c13a3e45 (patch) | |
tree | 837ac0d60faec356052202d2724a233ad5407ed6 /insns.def | |
parent | f400cde0a07d83d690380f9d1aa2d6be5ec68b67 (diff) | |
download | ruby-a9df34cd05d9f88466c52364780f0e40c13a3e45.tar.gz |
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
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |