1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rexml/encoding.rb (REXML::Encoding#encoding=): store @encoding

a String which means the name of the encoding.
  this partially revert r29646.

* lib/rexml/document.rb: follow above.

* lib/rexml/output.rb: ditto.

* lib/rexml/parsers/baseparser.rb: ditto.

* lib/rexml/source.rb: ditto.

* lib/rexml/xmldecl.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-03-02 15:36:48 +00:00
parent cddcffb8f9
commit f25ff846f6
11 changed files with 114 additions and 147 deletions

View file

@ -184,7 +184,7 @@ module REXML
# that IE's limited abilities can handle. This hack inserts a space
# before the /> on empty tags. Defaults to false
def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
if xml_decl.encoding != ::Encoding::UTF_8 && !output.kind_of?(Output)
if xml_decl.encoding != 'UTF-8' && !output.kind_of?(Output)
output = Output.new( output, xml_decl.encoding )
end
formatter = if indent > -1