summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rexml/source.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb
index a0bbe25de7..cfafdbd67a 100644
--- a/lib/rexml/source.rb
+++ b/lib/rexml/source.rb
@@ -285,7 +285,7 @@ module REXML
case @encoding
when "UTF-16BE", "UTF-16LE"
@source.binmode
- @source.set_encoding(@encoding)
+ @source.set_encoding(@encoding, @encoding)
end
@line_break = encode(">")
@pending_buffer, @buffer = @buffer, ""