summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-14 07:55:37 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-14 07:55:37 +0000
commit39432526b68e90906f25742b2736a2b2141f2d2d (patch)
tree3f232a2aff8e6e61f591f9d799a9e6a19ff2e29b
parentac81a6e38d85ad623f699d4ed8dd319b5fb28d32 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--lib/rdoc/encoding.rb1
-rw-r--r--test/rdoc/test_rdoc_markup_pre_process.rb10
-rw-r--r--version.h2
4 files changed, 13 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f280ee6c9..3454586ab0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Tue Feb 14 16:52:17 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * 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@tubusu.net>
* test/rubygems/test_gem_commands_help_command.rb: Add one
diff --git a/lib/rdoc/encoding.rb b/lib/rdoc/encoding.rb
index 813d5ea6fa..ab752ee665 100644
--- a/lib/rdoc/encoding.rb
+++ b/lib/rdoc/encoding.rb
@@ -20,6 +20,7 @@ module RDoc::Encoding
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/, '')
diff --git a/test/rdoc/test_rdoc_markup_pre_process.rb b/test/rdoc/test_rdoc_markup_pre_process.rb
index 9a0a302b3e..34867c8c6b 100644
--- a/test/rdoc/test_rdoc_markup_pre_process.rb
+++ b/test/rdoc/test_rdoc_markup_pre_process.rb
@@ -43,11 +43,6 @@ Regular expressions (<i>regexp</i>s) are patterns which describe the
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 @@ contents of a string.
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
diff --git a/version.h b/version.h
index 3fd579b4d7..018fe17c21 100644
--- a/version.h
+++ b/version.h
@@ -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