This project is closed and read-only.
Backport #5878 ยป string.c.patch
| string.c (working copy) | ||
|---|---|---|
|
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);
|
||
|
}
|
||