From: Andrew Timberlake Date: 2009-04-15T14:59:17+09:00 Subject: Re: iterating over directories On Wed, Apr 15, 2009 at 7:41 AM, Dafydd Fontenot wrote: > I got this oneliner that isn't producing the output I was expecting (it > printing all of the directories in the linux root directory). > > irb(main):012:0> Dir.new("/").each { |name| puts name if > File.directory?(name) } > .. > . > => # > > Does anyone know what I might be doing incorrectly? It should be printing all of the directories in the linux root. What do you want it to do? Andrew Timberlake http://ramblingsonrails.com http://www.linkedin.com/in/andrewtimberlake "I have never let my schooling interfere with my education" - Mark Twain