Skip to content

Commit 2eee4b8

Browse files
committed
Fix warnings and skip encoding tests for 1.8
1 parent c5abcbd commit 2eee4b8

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

History.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
=== 3.3 / ??
1+
=== 3.3.1
2+
3+
* Bug fixes
4+
* Added skips to Encoding tests running on 1.8.
5+
* Fixed warnings
6+
7+
=== 3.3 / 2010-01-03
28

39
* Minor enhancements
410
* The coverage report can now report undocumented method parameters

lib/rdoc/stats.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def initialize num_files, verbosity = 1
3030
@num_files = num_files
3131

3232
@coverage_level = 0
33+
@doc_items = nil
3334
@fully_documented = nil
3435
@num_params = 0
3536
@percent_doc = nil

test/test_rdoc_code_object.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def test_comment_equals
3131
end
3232

3333
def test_comment_equals_encoding
34+
skip "Encoding not implemented" unless Object.const_defined? :Encoding
35+
3436
refute_equal Encoding::UTF_8, ''.encoding, 'Encoding sanity check'
3537

3638
input = 'text'
@@ -43,6 +45,8 @@ def test_comment_equals_encoding
4345
end
4446

4547
def test_comment_equals_encoding_blank
48+
skip "Encoding not implemented" unless Object.const_defined? :Encoding
49+
4650
refute_equal Encoding::UTF_8, ''.encoding, 'Encoding sanity check'
4751

4852
input = ''

test/test_rdoc_parser_ruby.rb

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -643,20 +643,6 @@ class ConstFailMeta
643643
assert_equal 1, const_fail_meta.attributes.length
644644
end
645645

646-
def test_parse_class_nested_superclass
647-
foo = RDoc::NormalModule.new 'Foo'
648-
foo.parent = @top_level
649-
650-
util_parser "class Bar < Super\nend"
651-
652-
tk = @parser.get_tk
653-
654-
@parser.parse_class foo, RDoc::Parser::Ruby::NORMAL, tk, ''
655-
656-
bar = foo.classes.first
657-
assert_equal 'Super', bar.superclass
658-
end
659-
660646
def test_parse_class_nested_superclass
661647
util_top_level
662648
foo = @top_level.add_module RDoc::NormalModule, 'Foo'

test/test_rdoc_ri_driver.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,12 @@ def test_method_type
570570
end
571571

572572
def test_name_regexp
573-
assert_equal /^RDoc::AnyMethod#new$/,
573+
assert_equal %r%^RDoc::AnyMethod#new$%,
574574
@driver.name_regexp('RDoc::AnyMethod#new')
575-
assert_equal /^RDoc::AnyMethod::new$/,
575+
assert_equal %r%^RDoc::AnyMethod::new$%,
576576
@driver.name_regexp('RDoc::AnyMethod::new')
577577

578-
assert_equal /^RDoc::AnyMethod(#|::)new$/,
578+
assert_equal %r%^RDoc::AnyMethod(#|::)new$%,
579579
@driver.name_regexp('RDoc::AnyMethod.new')
580580
end
581581

test/test_rdoc_text.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ def test_strip_newlines
145145
end
146146

147147
def test_strip_newlines_encoding
148+
skip "Encoding not implemented" unless Object.const_defined? :Encoding
149+
148150
assert_equal Encoding::UTF_8, ''.encoding, 'Encoding sanity check'
149151

150152
text = " \n"

0 commit comments

Comments
 (0)