summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/generator/html.rb3
-rw-r--r--lib/rdoc/options.rb6
-rw-r--r--lib/rdoc/parsers/parse_rb.rb1
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/rdoc/generator/html.rb b/lib/rdoc/generator/html.rb
index f035857aff..b99af4d47b 100644
--- a/lib/rdoc/generator/html.rb
+++ b/lib/rdoc/generator/html.rb
@@ -68,6 +68,7 @@ class RDoc::Generator::HTML
def initialize(options) #:not-new:
@options = options
load_html_template
+ @main_page_path = nil
end
##
@@ -256,7 +257,7 @@ class RDoc::Generator::HTML
end
unless @main_page_path then
- file = @files.find { |file| file.document_self }
+ file = @files.find { |context| context.document_self }
@main_page_path = file.path if file
end
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index 364cd61d38..8dc55a3f18 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -189,7 +189,7 @@ class RDoc::Options
def parse(argv)
accessors = []
- opt = OptionParser.new do |opt|
+ opts = OptionParser.new do |opt|
opt.program_name = File.basename $0
opt.version = RDoc::VERSION
opt.summary_indent = ' ' * 4
@@ -513,7 +513,7 @@ Usage: #{opt.program_name} [options] [names...]
end
end
- opt.parse! argv
+ opts.parse! argv
@files = argv.dup
@@ -539,7 +539,7 @@ Usage: #{opt.program_name} [options] [names...]
end
rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e
- puts opt
+ puts opts
puts
puts e
exit 1
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index baf90577cb..637789992d 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -23,6 +23,7 @@ require "rdoc/markup/preprocess"
require "rdoc/parsers/parserfactory"
+$TOKEN_DEBUG ||= nil
#$TOKEN_DEBUG = $DEBUG_RDOC
# Definitions of all tokens involved in the lexical analysis