1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rexml/attribute.rb: [DOC] Update example for #namespace

Patch by Ippei Obayashi [Bug #8685] [ruby-core:56173]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2013-08-04 18:37:46 +00:00
parent 07e3b30c84
commit e730b1aa73
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Aug 5 03:35:11 2013 Zachary Scott <e@zzak.io>
* lib/rexml/attribute.rb: [DOC] Update example for #namespace
Patch by Ippei Obayashi [Bug #8685] [ruby-core:56173]
Sun Aug 4 21:08:29 2013 Masaki Matsushita <glass.saga@gmail.com>
* array.c (rb_ary_zip): performance implement by using

View file

@ -80,8 +80,11 @@ module REXML
# Returns the namespace URL, if defined, or nil otherwise
#
# e = Element.new("el")
# e.add_attributes({"xmlns:ns", "http://url"})
# e.namespace( "ns" ) # -> "http://url"
# e.add_namespace("ns", "http://url")
# e.add_attribute("ns:a", "b")
# e.add_attribute("nsx:a", "c")
# e.attribute("ns:a").namespace # => "http://url"
# e.attribute("nsx:a").namespace # => nil
def namespace arg=nil
arg = prefix if arg.nil?
@element.namespace arg