D
Dirk Meijer
------=_Part_29756_103068.1131376228467
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
hi all,
def foo(string)
arr=3D[string]
puts arr
arr.each do |b|
foo(b)
end
end
foo("foobar")
this results in an endless loop.. (though it gives SystemStackError)
but why doesn't this go any deeper than one level?
require 'find'
def index(dir, filename=3Ddir)
list=3D[]
dirs=3D[]
Find.find(dir) do |filename|
list << filename.split(/\/|\.\//)
end
list.each do |file|
if file.length < 3
puts file
else
dirs << file[0]
end
end
dirs.each do |name|
index(name)
end
end
index(".","index")
i just don't see it..
greetings, Dirk.
------=_Part_29756_103068.1131376228467--
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
hi all,
def foo(string)
arr=3D[string]
puts arr
arr.each do |b|
foo(b)
end
end
foo("foobar")
this results in an endless loop.. (though it gives SystemStackError)
but why doesn't this go any deeper than one level?
require 'find'
def index(dir, filename=3Ddir)
list=3D[]
dirs=3D[]
Find.find(dir) do |filename|
list << filename.split(/\/|\.\//)
end
list.each do |file|
if file.length < 3
puts file
else
dirs << file[0]
end
end
dirs.each do |name|
index(name)
end
end
index(".","index")
i just don't see it..
greetings, Dirk.
------=_Part_29756_103068.1131376228467--