* 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/trunk@33902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b62aadf0dd
commit
434a5f93ad
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
Wed Nov 30 09:12:43 2011 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.
|
||||
|
||||
Wed Nov 30 09:09:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||
|
||||
* ext/psych/parser.c (parse): parse method can take an option file
|
||||
|
|
|
@ -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/, '')
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue