summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-12 01:16:19 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-12 01:16:19 +0000
commitd1b8b5e86bce06e566afe64b9742307c87f9c064 (patch)
treec8f1bcd1e03ee59bd035c56fd256370b23292866
parent376b8f939e56ccca0923e41823809c4205cd79a0 (diff)
downloadruby-d1b8b5e86bce06e566afe64b9742307c87f9c064.tar.gz
ruby-d1b8b5e86bce06e566afe64b9742307c87f9c064.tar.xz
ruby-d1b8b5e86bce06e566afe64b9742307c87f9c064.zip
Never exclude files given on command line
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/rdoc/rdoc.rb9
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 18a82da7a..e24fb5612 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Dec 12 10:14:03 2004 Dave Thomas <dave@pragprog.com>
+
+ * lib/rdoc/rdoc.rb (RDoc::RDoc::parse_files): Never exclude files
+ explicitly given on the command line.
+
Sat Dec 11 21:10:16 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/drb.rb: add DRbRemoteError. [ruby-list:40348],
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb
index 2fd67553e..18bf64c8c 100644
--- a/lib/rdoc/rdoc.rb
+++ b/lib/rdoc/rdoc.rb
@@ -144,19 +144,20 @@ module RDoc
# Given a list of files and directories, create a list
# of all the Ruby files they contain.
#
- # If +force_dic+ is true, we always add the given files.
+ # If +force_doc+ is true, we always add the given files.
# If false, only add files that we guarantee we can parse
# It is true when looking at files given on the command line,
# false when recursing through subdirectories.
#
# The effect of this is that if you want a file with a non-
# standard extension parsed, you must name it explicity.
+ #
- def normalized_file_list(options, relative_files, force_doc = false)
+ def normalized_file_list(options, relative_files, force_doc = false, exclude_pattern=nil)
file_list = []
relative_files.each do |rel_file_name|
- next if options.exclude && options.exclude =~ rel_file_name
+ next if exclude_pattern && exclude_pattern =~ rel_file_name
case type = File.stat(rel_file_name).ftype
when "file"
file_list << rel_file_name.sub(/^\.\//, '') if force_doc || ParserFactory.can_parse(rel_file_name)
@@ -181,7 +182,7 @@ module RDoc
# we may well contain subdirectories which must
# be tested for .document files
def list_files_in_directory(dir, options)
- normalized_file_list(options, Dir.glob(File.join(dir, "*")))
+ normalized_file_list(options, Dir.glob(File.join(dir, "*")), false, options.exclude)
end