ruby-changes:2194
From: ko1@a...
Date: 13 Oct 2007 00:05:03 +0900
Subject: [ruby-changes:2194] matz - Ruby:r13685 (trunk): * parse.y: encoding specifier should work if the line matches
matz 2007-10-13 00:04:46 +0900 (Sat, 13 Oct 2007) New Revision: 13685 Modified files: trunk/ChangeLog trunk/parse.y trunk/version.h Log: * parse.y: encoding specifier should work if the line matches /coding[:=] ?/, a la Python PEP-263, so that VIM comments like "# vim: set fileencoding=<encoding name>" should be recognized. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/version.h?r1=13685&r2=13684 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=13685&r2=13684 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13685&r2=13684 Index: ChangeLog =================================================================== --- ChangeLog (revision 13684) +++ ChangeLog (revision 13685) @@ -1,3 +1,9 @@ +Sat Oct 13 00:00:33 2007 Yukihiro Matsumoto <matz@r...> + + * parse.y: encoding specifier should work if the line matches + /coding[:=] ?/, a la Python PEP-263, so that VIM comments like + "# vim: set fileencoding=<encoding name>" should be recognized. + Fri Oct 12 15:04:54 2007 Nobuyoshi Nakada <nobu@r...> * trunk/parse.y (magic_comments): add "encoding" as same as "coding". Index: parse.y =================================================================== --- parse.y (revision 13684) +++ parse.y (revision 13685) @@ -5708,13 +5708,7 @@ if (ISSPACE(*str)) break; continue; } -#define BOW_P(p) ((p) == beg || !(ISALNUM((p)[-1]) || (p)[-1] == '_')) - if (strncasecmp(str-6, "coding", 6)) continue; - if (BOW_P(str-6)) break; - if (str - beg < 8) continue; - if (strncasecmp(str-8, "en", 2)) continue; - if (BOW_P(str-8)) break; -#undef BOW_P + if (strncasecmp(str-6, "coding", 6) == 0) break; } for (;;) { do { Index: version.h =================================================================== --- version.h (revision 13684) +++ version.h (revision 13685) @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-10-12" +#define RUBY_RELEASE_DATE "2007-10-13" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20071012 +#define RUBY_RELEASE_CODE 20071013 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 10 -#define RUBY_RELEASE_DAY 12 +#define RUBY_RELEASE_DAY 13 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml