small fix

that doesn’t affect tests, hmm
This commit is contained in:
Torsten Ruger 2015-06-14 00:06:17 +03:00
parent aebbe17252
commit bdd67b3213
1 changed files with 4 additions and 5 deletions

View File

@ -3,7 +3,7 @@ module Sof
# ObjectNode means node with structure # ObjectNode means node with structure
# ie arrays and hashes get transformed into these too # ie arrays and hashes get transformed into these too
class ObjectNode < Node class ObjectNode < Node
def initialize data , ref def initialize data , ref
super(ref) super(ref)
@ -18,12 +18,11 @@ module Sof
super super
io.write(@data) io.write(@data)
indent = " " * (level + 1) indent = " " * (level + 1)
@children.each_with_index do |child , i| @children.each do |k,v|
k , v = child
io.write "\n#{indent}" io.write "\n#{indent}"
k.out(io , level + 2) k.out(io , level + 1)
io.write " " io.write " "
v.out(io , level + 2) v.out(io , level + 1)
end end
end end
end end