diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-11 02:22:49 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-11 02:22:49 +0000 |
commit | d8cf72f4189e701172878836becef3f047a57dc5 (patch) | |
tree | 4d10d074b6b086921faae3e8c2dd486048ff7362 /string.c | |
parent | ccb84f7b04861339be7130b0dccc9de3a52a3436 (diff) |
merge revision(s) 34270: [Backport #5858]
* string.c (rb_str_concat): set array element after definition
to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
on Sparc. [Bug #5878] [ruby-dev:45123]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@40229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2098,7 +2098,8 @@ rb_str_concat(VALUE str1, VALUE str2) if (enc == rb_usascii_encoding()) { /* US-ASCII automatically extended to ASCII-8BIT */ - char buf[1] = {(char)code}; + char buf[1]; + buf[0] = (char)code; if (code > 0xFF) { rb_raise(rb_eRangeError, "%u out of char range", code); } |