Permalink
Browse files

Use join instead of looping and calling to_s [#5492 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 6c3f5eb commit 46c14a6b03fb9e8d1e1ed2fec2c248ea5ba24b7c @thiagopradi thiagopradi committed with josevalim Aug 30, 2010
Showing with 1 addition and 3 deletions.
  1. +1 −3 actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
View
4 actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
@@ -77,9 +77,7 @@ def initialize(parent, line=0, pos=0)
# 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

0 comments on commit 46c14a6

Please sign in to comment.