diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb index f83972b881e275..53cc3af63c9f2f 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/rdoc/test_rdoc_options.rb b/test/rdoc/test_rdoc_options.rb index 1eb20618a51a66..b6769d14b318b1 100644 --- a/test/rdoc/test_rdoc_options.rb +++ b/test/rdoc/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,