From 316205e9ea5af2b426f24389c89b1d0fb8cc7fd2 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 13 Jan 2019 13:16:56 +0000 Subject: [PATCH 1/3] rdoc: ignore garbage files * lib/rdoc/options.rb (RDoc::Options#init_ivars): exclude backup files by default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/options.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb index 801a84b21f..f83972b881 100644 --- a/lib/rdoc/options.rb +++ b/lib/rdoc/options.rb @@ -344,7 +344,9 @@ def initialize # :nodoc: def init_ivars # :nodoc: @dry_run = false - @exclude = [] + @exclude = %w[ + ~\z \.orig\z \.rej\z \.bak\z + ] @files = nil @force_output = false @force_update = true From cd792d44609a69ae2097e3d5b6a6d7a8e3bba59c Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 13 Jan 2019 13:41:36 +0000 Subject: [PATCH 2/3] rdoc: fixup the test for r66806 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_rdoc_options.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_rdoc_options.rb b/test/test_rdoc_options.rb index baef2d860e..1eb20618a5 100644 --- a/test/test_rdoc_options.rb +++ b/test/test_rdoc_options.rb @@ -66,7 +66,7 @@ class << coder; alias add []=; end expected = { 'charset' => 'UTF-8', 'encoding' => encoding, - 'exclude' => [], + 'exclude' => %w[~\z \.orig\z \.rej\z \.bak\z], 'hyperlink_all' => false, 'line_numbers' => false, 'locale' => nil, From eecc49e66289ea256f818da6af6e45bf3216ad04 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 13 Jan 2019 13:49:25 +0000 Subject: [PATCH 3/3] rdoc: ignore gemspec files [ruby-core:91067] [Bug #15531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/options.rb | 1 + test/test_rdoc_options.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb index f83972b881..53cc3af63c 100644 --- a/lib/rdoc/options.rb +++ b/lib/rdoc/options.rb @@ -346,6 +346,7 @@ def init_ivars # :nodoc: @dry_run = false @exclude = %w[ ~\z \.orig\z \.rej\z \.bak\z + \.gemspec\z ] @files = nil @force_output = false diff --git a/test/test_rdoc_options.rb b/test/test_rdoc_options.rb index 1eb20618a5..b6769d14b3 100644 --- a/test/test_rdoc_options.rb +++ b/test/test_rdoc_options.rb @@ -66,7 +66,7 @@ class << coder; alias add []=; end expected = { 'charset' => 'UTF-8', 'encoding' => encoding, - 'exclude' => %w[~\z \.orig\z \.rej\z \.bak\z], + 'exclude' => %w[~\z \.orig\z \.rej\z \.bak\z \.gemspec\z], 'hyperlink_all' => false, 'line_numbers' => false, 'locale' => nil,