diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-13 13:29:50 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-13 13:29:50 +0000 |
commit | 2e8f953d68275b3af4058a8335423b3d5c6d87a6 (patch) | |
tree | 3853ab383c58e94cc5448de492c71888545ebf49 /lib/rexml | |
parent | b19c39f94f5406b91142ae873b9912ee03a5ab31 (diff) | |
download | ruby-2e8f953d68275b3af4058a8335423b3d5c6d87a6.tar.gz |
* lib/rexml/document.rb: add REXML::Document#document.
reported by Tomas Hoger <thoger@redhat.com> and patched by nahi.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r-- | lib/rexml/document.rb | 4 | ||||
-rw-r--r-- | lib/rexml/entity.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb index 8342b96e6a..d7d24f4732 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 f447202394..3a35ec6b94 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', '>' ) |