ruby-changes:28190
From: xibbar <ko1@a...>
Date: Thu, 11 Apr 2013 22:23:11 +0900 (JST)
Subject: [ruby-changes:28190] xibbar:r40242 (trunk): * lib/cgi/html.rb: fix tagmaker because attributes should recognize.
xibbar 2013-04-11 22:23:01 +0900 (Thu, 11 Apr 2013) New Revision: 40242 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40242 Log: * lib/cgi/html.rb: fix tagmaker because attributes should recognize. [Bug #8252] Modified files: trunk/lib/cgi/html.rb trunk/test/cgi/test_cgi_tag_helper.rb Index: lib/cgi/html.rb =================================================================== --- lib/cgi/html.rb (revision 40241) +++ lib/cgi/html.rb (revision 40242) @@ -51,7 +51,7 @@ class CGI https://github.com/ruby/ruby/blob/trunk/lib/cgi/html.rb#L51 # # O O or - O def nO_element(element, attributes = {}) - s = nOE_element(element) + s = nOE_element(element, attributes) if block_given? s << yield.to_s s << "</#{element.upcase}>" Index: test/cgi/test_cgi_tag_helper.rb =================================================================== --- test/cgi/test_cgi_tag_helper.rb (revision 40241) +++ test/cgi/test_cgi_tag_helper.rb (revision 40242) @@ -349,6 +349,7 @@ class CGITagHelperTest < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/cgi/test_cgi_tag_helper.rb#L349 assert_equal('<FOOTER></FOOTER>',cgi.footer) assert_equal('<ARTICLE></ARTICLE>',cgi.article) assert_equal('<SECTION></SECTION>',cgi.section) + assert_equal('<!DOCTYPE HTML><HTML BLA="TEST"></HTML>',cgi.html("BLA"=>"TEST"){}) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/