diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-11 22:56:13 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-11 22:56:13 +0000 |
commit | 615e7987ca619a9d8df01844b61d95796b95fd19 (patch) | |
tree | 75467706dc185b58087aafb9f029e5c2e9a31ba8 /lib/rexml | |
parent | 83d7aca7f6c02a92d49be1490e72b50fe9643598 (diff) | |
download | ruby-615e7987ca619a9d8df01844b61d95796b95fd19.tar.gz |
* object.c (rb_obj_equal): Add documentation. Patch by Vincent Batts.
[Ruby 1.9 - Bug #4664]
* lib/rexml: ditto
* lib/mkmf.rb: ditto
* ext/socket/lib/socket.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r-- | lib/rexml/quickpath.rb | 2 | ||||
-rw-r--r-- | lib/rexml/xpath.rb | 3 | ||||
-rw-r--r-- | lib/rexml/xpath_parser.rb | 10 |
3 files changed, 15 insertions, 0 deletions
diff --git a/lib/rexml/quickpath.rb b/lib/rexml/quickpath.rb index 06cb4f9115..8229bacd6f 100644 --- a/lib/rexml/quickpath.rb +++ b/lib/rexml/quickpath.rb @@ -6,6 +6,8 @@ module REXML include Functions include XMLTokens + # A base Hash object to be used when initializing a + # default empty namespaces set. EMPTY_HASH = {} def QuickPath::first element, path, namespaces=EMPTY_HASH diff --git a/lib/rexml/xpath.rb b/lib/rexml/xpath.rb index 5f7ecefe29..a8952ff473 100644 --- a/lib/rexml/xpath.rb +++ b/lib/rexml/xpath.rb @@ -5,6 +5,9 @@ module REXML # Wrapper class. Use this class to access the XPath functions. class XPath include Functions + # A base Hash object, supposing to be used when initializing a + # default empty namespaces set, but is currently unused. + # TODO: either set the namespaces=EMPTY_HASH, or deprecate this. EMPTY_HASH = {} # Finds and returns the first node that matches the supplied xpath. diff --git a/lib/rexml/xpath_parser.rb b/lib/rexml/xpath_parser.rb index 3bffd389d0..0fc9da2e08 100644 --- a/lib/rexml/xpath_parser.rb +++ b/lib/rexml/xpath_parser.rb @@ -5,20 +5,30 @@ require 'rexml/syncenumerator' require 'rexml/parsers/xpathparser' class Object + # provides a unified +clone+ operation, for REXML::XPathParser + # to use across multiple Object types def dclone clone end end class Symbol + # provides a unified +clone+ operation, for REXML::XPathParser + # to use across multiple Object types def dclone ; self ; end end class Fixnum + # provides a unified +clone+ operation, for REXML::XPathParser + # to use across multiple Object types def dclone ; self ; end end class Float + # provides a unified +clone+ operation, for REXML::XPathParser + # to use across multiple Object types def dclone ; self ; end end class Array + # provides a unified +clone+ operation, for REXML::XPathParser + # to use across multiple Object+ types def dclone klone = self.clone klone.clear |