From 05c2cc90895750255f64254f2491ff0ad77cc13a Mon Sep 17 00:00:00 2001
From: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Fri, 9 Sep 2011 07:02:31 +0000
Subject: merge revision(s) r32791:

	* insns.def (concatstrings): don't use initial ASCII-8BIT string.
	  [ruby-core:38635] [Bug #5126]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index df36c6323b..ea00e413a3 100644
--- a/insns.def
+++ b/insns.def
@@ -392,9 +392,9 @@ concatstrings
 (...)
 (VALUE val) // inc += 1 - num;
 {
-    rb_num_t i = num;
+    rb_num_t i = num - 1;
 
-    val = rb_str_new(0, 0);
+    val = rb_str_resurrect(TOPN(i));
     while (i-- > 0) {
 	const VALUE v = TOPN(i);
 	rb_str_append(val, v);
-- 
cgit v1.2.3

