@@ -778,12 +778,13 @@ def test_parse_class_stopdoc
778
778
779
779
def test_parse_class_lower_name_warning
780
780
@options . verbosity = 2
781
- out , err = capture_io do
781
+ stds = capture_io do
782
782
util_parser "class foo\n end"
783
783
tk = @parser . get_tk
784
784
@parser . parse_class @top_level , RDoc ::Parser ::Ruby ::NORMAL , tk , @comment
785
785
end
786
- assert_match /Expected class name or '<<'\. Got/ , err
786
+ err = stds [ 1 ]
787
+ assert_match ( /Expected class name or '<<'\. Got/ , err )
787
788
end
788
789
789
790
def test_parse_multi_ghost_methods
@@ -1379,8 +1380,6 @@ class Klass3
1379
1380
klass = @store . find_class_named 'Klass'
1380
1381
klass2 = @store . find_class_named 'Klass2'
1381
1382
klass3 = @store . find_class_named 'Klass3'
1382
- constant = klass2 . find_module_named 'CONSTANT'
1383
- constant2 = klass3 . find_module_named 'CONSTANT_2'
1384
1383
assert_equal klass , klass2 . constants . first . is_alias_for
1385
1384
refute_equal klass , klass3 . constants . first . is_alias_for
1386
1385
assert_nil klass3 . find_module_named 'CONSTANT_2'
@@ -3639,7 +3638,7 @@ class C
3639
3638
@parser . scan
3640
3639
3641
3640
c = @store . find_class_named 'C'
3642
- const_a , const_b , const_c , const_d = c . constants . sort_by ( &:name )
3641
+ const_a , const_b , const_c = c . constants . sort_by ( &:name )
3643
3642
3644
3643
assert_equal 'CONST_A' , const_a . name
3645
3644
assert_equal :public , const_a . visibility
0 commit comments