[ruby-trunk - Bug #5878][Open] compile error in string.c:2096 since r34236

Issue #5878 has been reported by Naohisa G…

Bug #5878: compile error in string.c:2096 since r34236

Author: Naohisa G.
Status: Open
Priority: Normal
Target version:
ruby -v: ruby 2.0.0dev (2012-01-10) [sparc-solaris2.10]

r34236 以降、Solaris 10 上の Fujitsu fcc 5.6 にて、string.c

“string.c”, line 2096: error: initialization: constant expression is
expected fo
r variable: `buf’


Index: string.c

— string.c (revision 34265)
+++ string.c (working copy)
@@ -2093,7 +2093,8 @@

 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);

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs