From f25ff846f6884e202d13ab28e3e10c917b9cdf31 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 2 Mar 2011 15:36:48 +0000 Subject: * 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 --- lib/rexml/document.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rexml/document.rb') diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb index 68a744d9e5..790a1c78db 100644 --- a/lib/rexml/document.rb +++ b/lib/rexml/document.rb @@ -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 -- cgit v1.2.3