summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/string.c b/string.c
index 65268e806b..f2c60715a2 100644
--- a/string.c
+++ b/string.c
@@ -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);
}