1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y (set_file_encoding): case-insensitive search, a patch from

David Flanagan <david AT davidflanagan.com> [ruby-core:12629]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-10-13 00:12:00 +00:00
parent fc3e0bd562
commit e0a6ff2aa6
2 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Sat Oct 13 09:11:58 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (set_file_encoding): case-insensitive search, a patch from
David Flanagan <david AT davidflanagan.com> [ruby-core:12629]
Sat Oct 13 09:02:16 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* {bcc,win}32/mkexports.rb: explicit data. [ruby-list:44108]

12
parse.y
View file

@ -5693,12 +5693,12 @@ set_file_encoding(struct parser_params *parser, const char *str, const char *sen
for (;;) {
if (send - str <= 6) return;
switch (str[6]) {
case 'c': str += 6; continue;
case 'o': str += 5; continue;
case 'd': str += 4; continue;
case 'i': str += 3; continue;
case 'n': str += 2; continue;
case 'g': str += 1; continue;
case 'C': case 'c': str += 6; continue;
case 'O': case 'o': str += 5; continue;
case 'D': case 'd': str += 4; continue;
case 'I': case 'i': str += 3; continue;
case 'N': case 'n': str += 2; continue;
case 'G': case 'g': str += 1; continue;
case '=': case ':':
sep = 1;
str += 6;