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

rexml: Make more readable

test/rexml/xpath/test_base.rb: Use here document for readability.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2018-04-21 06:18:08 +00:00
parent 7e9c19ad3d
commit daec80fe98

View file

@ -873,7 +873,12 @@ module REXMLTests
end
def test_xpath_namespace
d = REXML::Document.new("<tag1 xmlns='ns1'><tag2 xmlns='ns2'/><tada>xa</tada></tag1>")
d = REXML::Document.new(<<-XML)
<tag1 xmlns='ns1'>
<tag2 xmlns='ns2'/>
<tada>xa</tada>
</tag1>
XML
x = d.root
num = 0
x.each_element('tada') { num += 1 }