summaryrefslogtreecommitdiff
path: root/test/rexml/test_encoding.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rexml/test_encoding.rb')
-rw-r--r--test/rexml/test_encoding.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/rexml/test_encoding.rb b/test/rexml/test_encoding.rb
index 8205d0f366..3b2a56ac5e 100644
--- a/test/rexml/test_encoding.rb
+++ b/test/rexml/test_encoding.rb
@@ -88,7 +88,9 @@ module REXMLTests
end
def test_ticket_110
- utf16 = REXML::Document.new(File.new(fixture_path("ticket_110_utf16.xml")))
+ utf16 = File.open(fixture_path("ticket_110_utf16.xml")) do |f|
+ REXML::Document.new(f)
+ end
assert_equal(utf16.encoding, "UTF-16")
assert( utf16[0].kind_of?(REXML::XMLDecl))
end