diff options
Diffstat (limited to 'lib/rdoc/options.rb')
-rw-r--r-- | lib/rdoc/options.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb index 0d99a5438e..62c6dabff0 100644 --- a/lib/rdoc/options.rb +++ b/lib/rdoc/options.rb @@ -346,7 +346,7 @@ class Options @show_all = false @main_page = nil @marge = false - @exclude = nil + @exclude = [] @quiet = false @generator_name = 'html' @generator = generators[@generator_name] @@ -386,7 +386,7 @@ class Options when "--all" then @show_all = true when "--charset" then @charset = arg when "--debug" then $DEBUG = true - when "--exclude" then @exclude = Regexp.new(arg) + when "--exclude" then @exclude << Regexp.new(arg) when "--inline-source" then @inline_source = true when "--line-numbers" then @include_line_numbers = true when "--main" then @main_page = arg @@ -473,6 +473,12 @@ class Options @rdoc_include << "." if @rdoc_include.empty? + if @exclude.empty? + @exclude = nil + else + @exclude = Regexp.new(@exclude.join("|")) + end + check_files # If no template was specified, use the default |