summaryrefslogtreecommitdiff
path: root/test/rexml/test_lightparser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rexml/test_lightparser.rb')
-rw-r--r--test/rexml/test_lightparser.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/rexml/test_lightparser.rb b/test/rexml/test_lightparser.rb
index 4aa465b9fa..f8212dcd2e 100644
--- a/test/rexml/test_lightparser.rb
+++ b/test/rexml/test_lightparser.rb
@@ -6,9 +6,10 @@ module REXMLTests
include REXMLTestUtils
include REXML
def test_parsing
- f = File.new(fixture_path("documentation.xml"))
- parser = REXML::Parsers::LightParser.new( f )
- parser.parse
+ File.open(fixture_path("documentation.xml")) do |f|
+ parser = REXML::Parsers::LightParser.new( f )
+ parser.parse
+ end
end
end
end