Skip to content

Commit 78f3ce4

Browse files
authored
Merge pull request #766 from nobu/bug/env-leak
Fixed inadvertent environment variable changes
2 parents 4c8cb70 + 6c4801d commit 78f3ce4

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

test/rdoc/test_rdoc_markdown.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
class TestRDocMarkdown < RDoc::TestCase
99

1010
def setup
11+
super
12+
1113
@RM = RDoc::Markup
1214

1315
@parser = RDoc::Markdown.new

test/rdoc/test_rdoc_parser_changelog.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ def setup
1414

1515
def teardown
1616
@tempfile.close!
17+
18+
super
1719
end
1820

1921
def test_class_can_parse

test/rdoc/test_rdoc_ri_driver.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def setup
1313
FileUtils.mkdir_p @home_ri
1414

1515
@orig_ri = ENV['RI']
16-
@orig_home = ENV['HOME']
1716
ENV['HOME'] = @tmpdir
1817
@rdoc_home = File.join ENV["HOME"], ".rdoc"
1918
FileUtils.mkdir_p @rdoc_home
@@ -33,11 +32,10 @@ def setup
3332
end
3433

3534
def teardown
36-
super
37-
38-
ENV['HOME'] = @orig_home
3935
ENV['RI'] = @orig_ri
4036
FileUtils.rm_rf @tmpdir
37+
38+
super
4139
end
4240

4341
DUMMY_PAGER = ":;\n"

test/rdoc/test_rdoc_ri_paths.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def setup
3636
end
3737

3838
def teardown
39-
super
40-
4139
Gem.use_paths(*@orig_gem_path)
4240
Gem::Specification.reset
4341
FileUtils.rm_rf @tempdir
4442
ENV.replace(@orig_env)
43+
44+
super
4545
end
4646

4747
def test_class_each

0 commit comments

Comments
 (0)