summaryrefslogtreecommitdiff
path: root/lib/rexml/source.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-11 02:48:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-11 02:48:17 +0000
commitf2ad09d5b7cdea64963433af13a9525bebc19a78 (patch)
treef89148671efd94b1acfbbd299ceae518a5137ec7 /lib/rexml/source.rb
parent390b340d52ffe7e7d09601dc7c4ba189cfe11f21 (diff)
* lib/rexml/source.rb (REXML::Source::encoding): should not
convert the body twice. [ruby-core:08828] * lib/rexml/encoding.rb (REXML::Encoding::encoding): Encoding#encoding= to return boolean value to tell if the body is really converted or not. * lib/rexml/encoding.rb (REXML::Encoding::encoding): Specific conversion library (e.g. rexml/encodings/UTF-16.rb) to have higher preceding. * lib/rexml/encodings/UTF-16.rb (REXML::Encoding::decode_utf16): UTF-16#decode_utf16 should work strings without BOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/source.rb')
-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 c51f504811..3b6e813baf 100644
--- a/lib/rexml/source.rb
+++ b/lib/rexml/source.rb
@@ -44,7 +44,7 @@ module REXML
# Inherited from Encoding
# Overridden to support optimized en/decoding
def encoding=(enc)
- super
+ return unless super
@line_break = encode( '>' )
if enc != UTF_8
@buffer = decode(@buffer)