From d6ea8d18f9ffb76aa3541087e55e90c030295129 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 13 Nov 2014 13:35:51 +0000 Subject: merge revision(s) 48402: * lib/rexml/document.rb: add REXML::Document#document. reported by Tomas Hoger and patched by nahi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@48403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rexml/document.rb | 4 ++++ lib/rexml/entity.rb | 1 + 2 files changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb index 76679d1c16..e5cef13b03 100644 --- a/lib/rexml/document.rb +++ b/lib/rexml/document.rb @@ -278,6 +278,10 @@ module REXML end end + def document + self + end + private def build( source ) Parsers::TreeParser.new( source, self ).parse diff --git a/lib/rexml/entity.rb b/lib/rexml/entity.rb index dc3f666cad..d10b051f18 100644 --- a/lib/rexml/entity.rb +++ b/lib/rexml/entity.rb @@ -157,6 +157,7 @@ module REXML # This is a set of entity constants -- the ones defined in the XML # specification. These are +gt+, +lt+, +amp+, +quot+ and +apos+. + # CAUTION: these entities does not have parent and document module EntityConst # +>+ GT = Entity.new( 'gt', '>' ) -- cgit v1.2.3