On 07/11/05, Dirk Meijer <hawkman.gelooft / gmail.com> wrote:
> [snip badly formated code]

def foo(string)
  arr = [string]
  puts arr
  arr.each do |b|
    foo(b)
  end
end
foo("foobar")

That is a very complicated way of writing

def foo(a)
  foo(a)
end
foo("foobar")

What do you want to achieve here?

>
> require 'find'
> def index(dir, filename=dir)
> list=[]
> dirs=[]
> 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.
>
>

What do you want to achieve with the above. I suppose you'll get
better answers if you describe your problem than by submitting
obfuscated code.

cheers,

Brian

--
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/