Backport #4489 ยป parse.y.patch
parse.y | ||
---|---|---|
if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
|
||
return nlen;
|
||
}
|
||
if (len > 4 && name[nlen = len - 5] == '-') {
|
||
if (len > 4 && name[nlen = len - 4] == '-') {
|
||
if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
|
||
return nlen;
|
||
if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0)
|
||
if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
|
||
!(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0) &&
|
||
!(len == 9 && rb_memcicmp(name, "utf-8-mac", len) == 0))
|
||
return nlen;
|
||
}
|
||
return len;
|