diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | sample/test.rb | 3 | ||||
-rw-r--r-- | version.h | 4 |
3 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Thu May 14 10:17:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * sample/test.rb (valid_syntax?): defaults to us-ascii. + Wed May 13 22:34:31 2009 Narihiro Nakamura <authorNari@gmail.com> * gc.c: add longlife garbage collection. [ruby-dev:38423] diff --git a/sample/test.rb b/sample/test.rb index 03ab435e00..b0475c89f6 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1,4 +1,5 @@ #! /usr/bin/env ruby +# -*- coding: us-ascii -*- $testnum=0 $ntest=0 @@ -1932,7 +1933,7 @@ def valid_syntax?(code, fname) code.force_encoding("ascii-8bit") code = code.sub(/\A(?:\s*\#.*$)*(\n)?/n) { "#$&#{"\n" if $1 && !$2}BEGIN{throw tag, :ok}\n" - } + }.force_encoding("us-ascii") catch {|tag| eval(code, binding, fname, 0)} rescue Exception STDERR.puts $!.message @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2009-05-13" +#define RUBY_RELEASE_DATE "2009-05-14" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" @@ -8,7 +8,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 5 -#define RUBY_RELEASE_DAY 13 +#define RUBY_RELEASE_DAY 14 #include "ruby/version.h" |