Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Jan 29, 2011
1 parent e8c3a12 commit 14c8276
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/rdoc/parser/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def initialize(top_level, file_name, content, options, stats)
@scanner.exception_on_syntax_error = false
@prev_seek = nil

@encoding = nil
@encoding = @options.encoding if Object.const_defined? :Encoding

reset
Expand Down
6 changes: 3 additions & 3 deletions test/test_rdoc_class_module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_update_aliases_class
n1 = @xref_data.add_module RDoc::NormalClass, 'N1'
n1_k2 = n1.add_module RDoc::NormalClass, 'N2'

n1.add_module_alias n1_k2, 'A1', @top_level
n1.add_module_alias n1_k2, 'A1', @xref_data

n1_a1_c = n1.constants.find { |c| c.name == 'A1' }
refute_nil n1_a1_c
Expand All @@ -138,7 +138,7 @@ def test_update_aliases_module
n1 = @xref_data.add_module RDoc::NormalModule, 'N1'
n1_n2 = n1.add_module RDoc::NormalModule, 'N2'

n1.add_module_alias n1_n2, 'A1', @top_level
n1.add_module_alias n1_n2, 'A1', @xref_data

n1_a1_c = n1.constants.find { |c| c.name == 'A1' }
refute_nil n1_a1_c
Expand All @@ -163,7 +163,7 @@ def test_update_aliases_reparent
l1_l2 = l1.add_module RDoc::NormalModule, 'L2'
o1 = @xref_data.add_module RDoc::NormalModule, 'O1'

o1.add_module_alias l1_l2, 'A1', @top_level
o1.add_module_alias l1_l2, 'A1', @xref_data

o1_a1_c = o1.constants.find { |c| c.name == 'A1' }
refute_nil o1_a1_c
Expand Down
1 change: 0 additions & 1 deletion test/test_rdoc_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def test_add_module_alias
c3_c4 = @c2.add_module_alias @c2_c3, 'C4', tl

c4 = @c2.find_module_named('C4')
c2_c3_c4 = @c2_c3.find_module_named('C4')

alias_constant = @c2.constants.first

Expand Down

0 comments on commit 14c8276

Please sign in to comment.