Skip to content

Commit

Permalink
merge revision(s) 33902:
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
unak committed Feb 14, 2012
1 parent ac81a6e commit 3943252
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/, '')

Expand Down
10 changes: 0 additions & 10 deletions test/rdoc/test_rdoc_markup_pre_process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ def test_include_file
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

Expand All @@ -67,11 +62,6 @@ def test_include_file_encoding_incompatible

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

Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3943252

Please sign in to comment.