Project

General

Profile

Backport #4489 ยป parse.y.patch

quix (James M. Lawrence), 03/10/2011 01:52 PM

View differences:

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;
    (1-1/1)