fix to_s (mostly)
This commit is contained in:
@ -24,8 +24,9 @@ module Ruby
|
||||
# helper method for formatting source code
|
||||
# depth is the depth in the tree (os the ast)
|
||||
# and the string are the ones to be indented (2 spaces)
|
||||
def at_depth(depth , *strings)
|
||||
def at_depth(depth , lines)
|
||||
prefix = " " * 2 * depth
|
||||
strings = lines.split("\n")
|
||||
strings.collect{|str| prefix + str}.join("\n")
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user