summaryrefslogtreecommitdiff
path: root/lang/ruby31-base/patches/patch-lib_rdoc_encoding.rb
blob: be77c100bf51a438031116f929efec3315fdd9b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-lib_rdoc_encoding.rb,v 1.1 2022/01/16 13:57:10 taca Exp $

* Always convert "\r\n" to "\n" since it cause rdoc processing error.

--- lib/rdoc/encoding.rb.orig	2018-03-26 05:56:26.000000000 +0000
+++ lib/rdoc/encoding.rb
@@ -31,7 +31,7 @@ module RDoc::Encoding
 
   def self.read_file filename, encoding, force_transcode = false
     content = File.open filename, "rb" do |f| f.read end
-    content.gsub!("\r\n", "\n") if RUBY_PLATFORM =~ /mswin|mingw/
+    content.gsub!("\r\n", "\n")
 
     utf8 = content.sub!(/\A\xef\xbb\xbf/, '')