summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-04 21:16:19 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-04 21:16:19 +0000
commitbe710a03919604a1b7776043aecc5cf0914da01c (patch)
tree4e5fd151d3099043c7b75e3bef2f22135081ff9d /lib/rdoc
parent3467a1754c83c0f4061f345a7ee965f60d16fca5 (diff)
* lib/rdoc/parsers/parse_rb.rb: Fix uninitialized variable warnings.
* lib/rdoc/generator/html.rb: ditto. * lib/rdoc/options.rb: Fix shadowed variable warning. * lib/webrick/httprequest.rb: Fix redefined method warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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