Skip to content

Commit 51755c8

Browse files
committed
Suppress warning
1 parent c7907cc commit 51755c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_rdoc_options.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def test_check_files
2020
out, err = capture_io do
2121
Dir.mktmpdir do |dir|
2222
begin
23+
unreadable = nil # variable for windows
24+
2325
Dir.chdir dir do
2426
if RUBY_PLATFORM =~ /mswin|mingw/ then
2527
unreadable = open 'unreadable'
@@ -34,7 +36,7 @@ def test_check_files
3436
@options.check_files
3537
end
3638
ensure
37-
unreadable.close if defined?(unreadable)
39+
unreadable.close if unreadable
3840
end
3941
end
4042
end

0 commit comments

Comments
 (0)