ruby-changes:26256
From: usa <ko1@a...>
Date: Tue, 11 Dec 2012 17:48:11 +0900 (JST)
Subject: [ruby-changes:26256] usa:r38313 (ruby_1_9_3): merge revision(s) 38285: [Backport #4281]
usa 2012-12-11 17:47:37 +0900 (Tue, 11 Dec 2012) New Revision: 38313 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38313 Log: merge revision(s) 38285: [Backport #4281] * lib/irb/magic-file.rb: set a encoding, which is detected from the file to read, to the internal encoding. [Bug #4281][ruby-dev:43036] Modified directories: branches/ruby_1_9_3/ Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/lib/irb/magic-file.rb branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 38312) +++ ruby_1_9_3/ChangeLog (revision 38313) @@ -1,3 +1,9 @@ +Tue Dec 11 17:47:01 2012 Narihiro Nakamura <authornari@g...> + + * lib/irb/magic-file.rb: set a encoding, which is detected from + the file to read, to the internal encoding. + [Bug #4281][ruby-dev:43036] + Thu Nov 15 15:17:11 2012 Nobuyoshi Nakada <nobu@r...> * gc.c (free_method_entry_i): method entry may be in Index: ruby_1_9_3/lib/irb/magic-file.rb =================================================================== --- ruby_1_9_3/lib/irb/magic-file.rb (revision 38312) +++ ruby_1_9_3/lib/irb/magic-file.rb (revision 38313) @@ -8,9 +8,10 @@ line = io.gets line = io.gets if line[0,2] == "#!" encoding = detect_encoding(line) + internal_encoding = encoding encoding ||= default_src_encoding io.rewind - io.set_encoding(encoding, nil) + io.set_encoding(encoding, internal_encoding) if block_given? begin Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 38312) +++ ruby_1_9_3/version.h (revision 38313) @@ -1,10 +1,10 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 332 +#define RUBY_PATCHLEVEL 333 -#define RUBY_RELEASE_DATE "2012-11-15" +#define RUBY_RELEASE_DATE "2012-12-11" #define RUBY_RELEASE_YEAR 2012 -#define RUBY_RELEASE_MONTH 11 -#define RUBY_RELEASE_DAY 15 +#define RUBY_RELEASE_MONTH 12 +#define RUBY_RELEASE_DAY 11 #include "ruby/version.h" Property changes on: ruby_1_9_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r38285 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/