summaryrefslogtreecommitdiff
path: root/lib/rexml
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-28 10:57:01 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-28 10:57:01 +0000
commit054ae037e656b349fa55f32aa18c1338027ed26e (patch)
tree37ac308c51ebe44f5b6fde95024c91dc30e603a8 /lib/rexml
parent9f773625e5ae2d9b38ec5ccd6ecc6435fc891439 (diff)
* lib/rexml/source.rb (REXML::IOSource#initialize): Use
encode("UTF-16XX") instead of UTF-16XX encoded byte string by hand. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r--lib/rexml/source.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb
index 112393cfd4..46c2fc79cd 100644
--- a/lib/rexml/source.rb
+++ b/lib/rexml/source.rb
@@ -149,9 +149,9 @@ module REXML
if encoding
self.encoding = encoding
elsif str[0,2] == "\xfe\xff"
- @line_break = "\000>"
+ @line_break = ">".encode("UTF-16BE")
elsif str[0,2] == "\xff\xfe"
- @line_break = ">\000"
+ @line_break = ">".encode("UTF-16LE")
elsif str[0,2] == "\xef\xbb"
str += @source.read(1)
str = '' if (str[2,1] == "\xBF")