From d962ef745445532eb267651b2a6e09722a732178 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 12 Oct 2007 15:04:46 +0000 Subject: [PATCH] * parse.y: encoding specifier should work if the line matches /coding[:=] ?/, a la Python PEP-263, so that VIM comments like "# vim: set fileencoding=" should be recognized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ parse.y | 8 +------- version.h | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index c62b473baa..39af0bb5e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Oct 13 00:00:33 2007 Yukihiro Matsumoto + + * parse.y: encoding specifier should work if the line matches + /coding[:=] ?/, a la Python PEP-263, so that VIM comments like + "# vim: set fileencoding=" should be recognized. + Fri Oct 12 15:04:54 2007 Nobuyoshi Nakada * trunk/parse.y (magic_comments): add "encoding" as same as "coding". diff --git a/parse.y b/parse.y index fe90b3c6e0..0431622e34 100644 --- a/parse.y +++ b/parse.y @@ -5708,13 +5708,7 @@ set_file_encoding(struct parser_params *parser, const char *str, const char *sen 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 { diff --git a/version.h b/version.h index 5ea27a56fc..80d482482b 100644 --- a/version.h +++ b/version.h @@ -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[];