summaryrefslogtreecommitdiff
path: root/test/rexml/test_jaxen.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rexml/test_jaxen.rb')
-rw-r--r--test/rexml/test_jaxen.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/rexml/test_jaxen.rb b/test/rexml/test_jaxen.rb
index ab66139cb0..1eec73f3e0 100644
--- a/test/rexml/test_jaxen.rb
+++ b/test/rexml/test_jaxen.rb
@@ -39,8 +39,9 @@ module REXMLTests
def test( fname )
# Dir.entries( xml_dir ).each { |fname|
# if fname =~ /\.xml$/
- file = File.new(fixture_path(fname+".xml"))
- doc = Document.new( file )
+ doc = File.open(fixture_path(fname+".xml")) do |file|
+ Document.new(file)
+ end
XPath.each( doc, "/tests/document" ) {|e| handleDocument(e)}
# end
# }