[前][次][番号順一覧][スレッド一覧]

ruby-changes:51011

From: kou <ko1@a...>
Date: Sat, 21 Apr 2018 15:18:13 +0900 (JST)
Subject: [ruby-changes:51011] kou:r63218 (trunk): rexml: Make more readable

kou	2018-04-21 15:18:08 +0900 (Sat, 21 Apr 2018)

  New Revision: 63218

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63218

  Log:
    rexml: Make more readable
    
    test/rexml/xpath/test_base.rb: Use here document for readability.

  Modified files:
    trunk/test/rexml/xpath/test_base.rb
Index: test/rexml/xpath/test_base.rb
===================================================================
--- test/rexml/xpath/test_base.rb	(revision 63217)
+++ test/rexml/xpath/test_base.rb	(revision 63218)
@@ -873,7 +873,12 @@ module REXMLTests https://github.com/ruby/ruby/blob/trunk/test/rexml/xpath/test_base.rb#L873
     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 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]