From: YANAGAWA Kazuhisa Date: 2006-01-29T13:41:22+09:00 Subject: Re: working with file types and directories In Message-Id: <20060129143153.13a84c8e@localhost.localdomain> John Maclean writes: > puts "files have been checked" if Dir.foreach(".") {|x| puts > FileTest.writable?(x) } == "true" Dir.foreach returns nil, nil != "true" so the condition can not be met. I think you want to do the following, right? Dir.foreach(".") {|x| puts "file have been checked" if FileTest.writable?(x)} where print out the message for each x which is a name of writable file in the current directory. -- kjana@dm4lab.to January 29, 2006 Youth comes but once in a lifetime.