summaryrefslogtreecommitdiff
path: root/test/rexml/test_listener.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rexml/test_listener.rb')
-rw-r--r--test/rexml/test_listener.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/rexml/test_listener.rb b/test/rexml/test_listener.rb
index ea84e0edf5..309e827880 100644
--- a/test/rexml/test_listener.rb
+++ b/test/rexml/test_listener.rb
@@ -93,10 +93,9 @@ module REXMLTests
a.value.force_encoding('binary')
end
assert_equal( "\xC3\xA9", a.value)
- doc = REXML::Document.parse_stream(
- File::new(fixture_path("stream_accents.xml")),
- AccentListener::new
- )
+ doc = File::open(fixture_path("stream_accents.xml")) do |f|
+ REXML::Document.parse_stream(f, AccentListener::new)
+ end
end
end