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 69ae216 commit fed73ffecf7b877856e077dbfed2f0f7a95e2934 @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
@@ -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 fed73ff

Please sign in to comment.