mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@34270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
28d28e844e
commit
c5831f3926
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Jan 11 23:40:21 2012 Naohisa Goto <ngoto@gen-info.osaka-u.ac.jp>
|
||||
|
||||
* 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]
|
||||
|
||||
Wed Jan 11 22:52:51 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||
|
||||
* gc.c (ruby_mimmalloc): don't set allocated size to header.
|
||||
|
|
3
string.c
3
string.c
|
@ -2093,7 +2093,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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue