Skip to content

Commit 9d4a4fe

Browse files
committed
Fix unused variable warnings
1 parent 6c0b466 commit 9d4a4fe

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

lib/rdoc/parser/c.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def initialize top_level, file_name, content, options, stats
174174
@singleton_classes = load_variable_map :c_singleton_class_variables
175175

176176
# class_variable => { function => [method, ...] }
177-
@methods = Hash.new { |h, f| h[f] = Hash.new { |h, m| h[m] = [] } }
177+
@methods = Hash.new { |h, f| h[f] = Hash.new { |i, m| i[m] = [] } }
178178

179179
# missing variable => [handle_class_module arguments]
180180
@missing_dependencies = {}

test/test_rdoc_class_module.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ def test_marshal_dump_visibilty
270270
section_comment.location = tl
271271

272272
assert_equal 1, cm.sections.length, 'sanity, default section only'
273-
s0 = cm.sections.first
274-
s1 = cm.add_section 'section', section_comment
275273

276274
cm.add_attribute a1
277275
cm.add_method m1
@@ -285,12 +283,6 @@ def test_marshal_dump_visibilty
285283

286284
assert_equal cm, loaded
287285

288-
inner = RDoc::Markup::Document.new(
289-
RDoc::Markup::Paragraph.new('this is a comment'))
290-
inner.file = tl
291-
292-
comment = RDoc::Markup::Document.new inner
293-
294286
assert_empty loaded.attributes
295287
assert_empty loaded.constants
296288
assert_empty loaded.includes

test/test_rdoc_rdoc.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ def test_parse_file
165165
def test_parse_file_binary
166166
@rdoc.store = RDoc::Store.new
167167

168-
root = File.dirname __FILE__
169-
binary_dat = File.expand_path 'binary.dat', root
168+
root = File.dirname __FILE__
170169

171170
@rdoc.options.root = Pathname root
172171

0 commit comments

Comments
 (0)