* lib/rdoc/*.rb: Remove unused variable warnings.

Patch by Run Paint [ruby-core:30991]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2010-11-08 20:58:28 +00:00
parent ec67ee3387
commit 571ed8655f
7 changed files with 6 additions and 10 deletions

View File

@ -277,7 +277,6 @@ class RDoc::Generator::Darkfish
outfile = @outputdir + file.path outfile = @outputdir + file.path
debug_msg " working on %s (%s)" % [ file.full_name, outfile ] debug_msg " working on %s (%s)" % [ file.full_name, outfile ]
rel_prefix = @outputdir.relative_path_from( outfile.dirname ) rel_prefix = @outputdir.relative_path_from( outfile.dirname )
context = binding()
debug_msg " rendering #{outfile}" debug_msg " rendering #{outfile}"
self.render_template( template_file, binding(), outfile ) self.render_template( template_file, binding(), outfile )

View File

@ -265,7 +265,6 @@ class RDoc::Markup::AttributeManager
def split_into_flow def split_into_flow
res = [] res = []
current_attr = 0 current_attr = 0
str = ""
str_len = @str.length str_len = @str.length

View File

@ -387,7 +387,7 @@ class RDoc::Markup::Parser
# Skips a token of +token_type+, optionally raising an error. # Skips a token of +token_type+, optionally raising an error.
def skip token_type, error = true def skip token_type, error = true
type, data, = get type, = get
return unless type # end of stream return unless type # end of stream

View File

@ -284,7 +284,6 @@ class RDoc::Parser::C < RDoc::Parser
\s*(\([^)]*\))([^;]|$))"xm \s*(\([^)]*\))([^;]|$))"xm
comment = $1 comment = $1
body_text = $2 body_text = $2
params = $3
remove_private_comments comment if comment remove_private_comments comment if comment
@ -304,7 +303,6 @@ class RDoc::Parser::C < RDoc::Parser
find_modifiers comment, meth_obj if comment find_modifiers comment, meth_obj if comment
#meth_obj.params = params
meth_obj.start_collecting_tokens meth_obj.start_collecting_tokens
tk = RDoc::RubyToken::Token.new nil, 1, 1 tk = RDoc::RubyToken::Token.new nil, 1, 1
tk.set_text body_text tk.set_text body_text

View File

@ -452,7 +452,8 @@ class RDoc::Parser::Ruby < RDoc::Parser
def parse_attr_accessor(context, single, tk, comment) def parse_attr_accessor(context, single, tk, comment)
args = parse_symbol_arg args = parse_symbol_arg
read = get_tkread get_tkread
rw = "?" rw = "?"
# TODO If nodoc is given, don't document any of them # TODO If nodoc is given, don't document any of them
@ -758,7 +759,8 @@ class RDoc::Parser::Ruby < RDoc::Parser
def parse_meta_attr(context, single, tk, comment) def parse_meta_attr(context, single, tk, comment)
args = parse_symbol_arg args = parse_symbol_arg
read = get_tkread get_tkread
rw = "?" rw = "?"
# If nodoc is given, don't document any of them # If nodoc is given, don't document any of them

View File

@ -383,8 +383,6 @@ The internal error was:
@generator = gen_klass.for @options @generator = gen_klass.for @options
pwd = Dir.pwd
Dir.chdir @options.op_dir do Dir.chdir @options.op_dir do
begin begin
self.class.current = self self.class.current = self

View File

@ -674,7 +674,7 @@ class RDoc::RubyLex
tk_c = TkLPAREN tk_c = TkLPAREN
end end
@indent_stack.push tk_c @indent_stack.push tk_c
tk = Token(tk_c) Token(tk_c)
end end
@OP.def_rule("[]", proc{|op, io| @lex_state == EXPR_FNAME}) do @OP.def_rule("[]", proc{|op, io| @lex_state == EXPR_FNAME}) do