1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Thiago Pradi 2010-08-29 23:45:52 -03:00 committed by José Valim
parent 6c3f5eb76c
commit 46c14a6b03

View file

@ -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