ruby-changes:22546
From: usa <ko1@a...>
Date: Tue, 14 Feb 2012 16:55:49 +0900 (JST)
Subject: [ruby-changes:22546] usa:r34595 (ruby_1_9_3): merge revision(s) 33902:
usa 2012-02-14 16:55:37 +0900 (Tue, 14 Feb 2012) New Revision: 34595 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34595 Log: merge revision(s) 33902: * lib/rdoc/encoding.rb (RDoc::Encoding.read_file): fixup newline chars on Windows. see https://github.com/rdoc/rdoc/issues/87 * test/rdoc/test_rdoc_markup_pre_process.rb (TestRDocMarkupPreProcess#test_include_file, TestRDocMarkupPreProcess#test_include_file_encoding_incompatible): follow above change. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/lib/rdoc/encoding.rb branches/ruby_1_9_3/test/rdoc/test_rdoc_markup_pre_process.rb branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 34594) +++ ruby_1_9_3/ChangeLog (revision 34595) @@ -1,3 +1,14 @@ +Tue Feb 14 16:52:17 2012 NAKAMURA Usaku <usa@r...> + + * lib/rdoc/encoding.rb (RDoc::Encoding.read_file): fixup newline chars + on Windows. + see https://github.com/rdoc/rdoc/issues/87 + + * test/rdoc/test_rdoc_markup_pre_process.rb + (TestRDocMarkupPreProcess#test_include_file, + TestRDocMarkupPreProcess#test_include_file_encoding_incompatible): + follow above change. + Tue Feb 14 16:34:11 2012 Shota Fukumori <sorah@t...> * test/rubygems/test_gem_commands_help_command.rb: Add one Index: ruby_1_9_3/lib/rdoc/encoding.rb =================================================================== --- ruby_1_9_3/lib/rdoc/encoding.rb (revision 34594) +++ ruby_1_9_3/lib/rdoc/encoding.rb (revision 34595) @@ -20,6 +20,7 @@ def self.read_file filename, encoding, force_transcode = false content = open filename, "rb" do |f| f.read end + content.gsub!("\r\n", "\n") if RUBY_PLATFORM =~ /mswin|mingw/ utf8 = content.sub!(/\A\xef\xbb\xbf/, '') Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 34594) +++ ruby_1_9_3/version.h (revision 34595) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 108 +#define RUBY_PATCHLEVEL 109 #define RUBY_RELEASE_DATE "2012-02-14" #define RUBY_RELEASE_YEAR 2012 Index: ruby_1_9_3/test/rdoc/test_rdoc_markup_pre_process.rb =================================================================== --- ruby_1_9_3/test/rdoc/test_rdoc_markup_pre_process.rb (revision 34594) +++ ruby_1_9_3/test/rdoc/test_rdoc_markup_pre_process.rb (revision 34595) @@ -43,11 +43,6 @@ contents of a string. EXPECTED - # FIXME 1.9 fix on windoze - # preprocessor uses binread, so line endings are \r\n - expected.gsub!("\n", "\r\n") if - RUBY_VERSION < "1.9.3" && RUBY_PLATFORM =~ /mswin|mingw/ - assert_equal expected, content end @@ -67,11 +62,6 @@ expected = "?\n" - # FIXME 1.9 fix on windoze - # preprocessor uses binread, so line endings are \r\n - expected.gsub!("\n", "\r\n") if - RUBY_VERSION < "1.9.3" && RUBY_PLATFORM =~ /mswin|mingw/ - assert_equal expected, content end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/