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:
parent
6c3f5eb76c
commit
46c14a6b03
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue