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: use Ruby native encoding mechnism. [ruby-dev:42464]

* lib/rexml/encodings/: remove.

* lib/rexml/document.rb, lib/rexml/formatters/default.rb,
  lib/rexml/output.rb, lib/rexml/parseexception.rb,
  lib/rexml/parsers/baseparser.rb, lib/rexml/source.rb,
  lib/rexml/xmldecl.rb: use Ruby's native Encoding object.

* test/rexml/, test/rss/: follow the above encoding chagnes.

* NEWS: add REXML's incompatible change about encoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2010-10-30 12:10:56 +00:00
parent 767fe5170d
commit 994f066f76
28 changed files with 126 additions and 489 deletions

View file

@ -69,9 +69,8 @@ module RSS
doc = REXML::Document.new(feed.to_s)
xmldecl = doc.xml_decl
%w(version encoding).each do |x|
assert_equal(instance_eval(x), xmldecl.__send__(x))
end
assert_equal(version, xmldecl.version)
assert_equal(encoding, xmldecl.encoding.to_s)
assert_equal(standalone, !xmldecl.standalone.nil?)
assert_equal(@uri, doc.root.namespace)
@ -96,9 +95,8 @@ module RSS
doc = REXML::Document.new(entry.to_s)
xmldecl = doc.xml_decl
%w(version encoding).each do |x|
assert_equal(instance_eval(x), xmldecl.__send__(x))
end
assert_equal(version, xmldecl.version)
assert_equal(encoding, xmldecl.encoding.to_s)
assert_equal(standalone, !xmldecl.standalone.nil?)
assert_equal(@uri, doc.root.namespace)