summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-23 07:13:09 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-23 07:13:09 +0000
commitedfcee2bd203195d08f476f3d3274941c5c2f318 (patch)
treec5011349f822466acbeff7777e4b0fd6be6bb9a0 /lib
parent0ef8ed93bcd7d0e073e0e2f28ada279471155100 (diff)
Fix 1.9 warnings in RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/code_objects.rb5
-rw-r--r--lib/rdoc/diagram.rb4
-rw-r--r--lib/rdoc/parsers/parse_c.rb2
-rw-r--r--lib/rdoc/parsers/parse_rb.rb9
-rw-r--r--lib/rdoc/ri/ri_paths.rb2
5 files changed, 11 insertions, 11 deletions
diff --git a/lib/rdoc/code_objects.rb b/lib/rdoc/code_objects.rb
index d6c4f1bdb9..d681982492 100644
--- a/lib/rdoc/code_objects.rb
+++ b/lib/rdoc/code_objects.rb
@@ -126,6 +126,7 @@ module RDoc
@title = title
@@sequence.succ!
@sequence = @@sequence.dup
+ @comment = nil
set_comment(comment)
end
@@ -385,8 +386,8 @@ module RDoc
module_name = modules.shift
result = find_module_named(module_name)
if result
- modules.each do |module_name|
- result = result.find_module_named(module_name)
+ modules.each do |name|
+ result = result.find_module_named(name)
break unless result
end
end
diff --git a/lib/rdoc/diagram.rb b/lib/rdoc/diagram.rb
index 9fdc49c02e..9d4234bc50 100644
--- a/lib/rdoc/diagram.rb
+++ b/lib/rdoc/diagram.rb
@@ -140,8 +140,8 @@ module RDoc
graph << m
unless mod.includes.empty?
- mod.includes.each do |m|
- m_full_name = find_full_name(m.name, mod)
+ mod.includes.each do |inc|
+ m_full_name = find_full_name(inc.name, mod)
if @local_names.include?(m_full_name)
@global_graph << DOT::DOTEdge.new('from' => "#{m_full_name.gsub( /:/,'_' )}",
'to' => "#{mod.full_name.gsub( /:/,'_' )}",
diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb
index 49f53b5e08..98f4b3f02e 100644
--- a/lib/rdoc/parsers/parse_c.rb
+++ b/lib/rdoc/parsers/parse_c.rb
@@ -166,7 +166,7 @@ module RDoc
class C_Parser
- attr_accessor :progress
+ attr_writer :progress
extend ParserFactory
parse_files_matching(/\.(?:([CcHh])\1?|c([+xp])\2|y)\z/)
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index e039a058b6..dcdcf6cef2 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -38,7 +38,7 @@ module RubyToken
class Token
NO_TEXT = "??".freeze
- attr :text
+ attr_accessor :text
def initialize(line_no, char_no)
@line_no = line_no
@@ -53,7 +53,7 @@ module RubyToken
self
end
- attr_reader :line_no, :char_no, :text
+ attr_reader :line_no, :char_no
end
class TkNode < Token
@@ -1934,9 +1934,8 @@ module RDoc
meth.singleton = true
else
unget_tk dot
- back_tk.reverse_each do
- |tk|
- unget_tk tk
+ back_tk.reverse_each do |token|
+ unget_tk token
end
name = name_t.name
diff --git a/lib/rdoc/ri/ri_paths.rb b/lib/rdoc/ri/ri_paths.rb
index 4a67e44ba5..167b4b521d 100644
--- a/lib/rdoc/ri/ri_paths.rb
+++ b/lib/rdoc/ri/ri_paths.rb
@@ -55,7 +55,7 @@ module RI
def self.path(use_system, use_site, use_home, use_gems, *extra_dirs)
path = raw_path(use_system, use_site, use_home, use_gems, *extra_dirs)
- return path.select { |path| File.directory? path }
+ return path.select { |directory| File.directory? directory }
end
# Returns the selected documentation directories including nonexistent