From 46c14a6b03fb9e8d1e1ed2fec2c248ea5ba24b7c Mon Sep 17 00:00:00 2001 From: Thiago Pradi Date: Sun, 29 Aug 2010 23:45:52 -0300 Subject: Use join instead of looping and calling to_s [#5492 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_controller/vendor/html-scanner/html/node.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'actionpack/lib/action_controller/vendor') diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb index d581399514..0eaad2b911 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb @@ -77,9 +77,7 @@ module HTML #:nodoc: # Return a textual representation of the node. def to_s - s = "" - @children.each { |child| s << child.to_s } - s + @children.join() end # Return false (subclasses must override this to provide specific matching -- cgit v1.2.3