From: Sean O'Halpin Date: 2008-10-03T16:03:59+09:00 Subject: Re: pathname's each_entry On Fri, Oct 3, 2008 at 7:20 AM, Claudio Greco wrote: > Daniel Berger wrote: >> Hm, you're right. I was thinking each_entry simply yielded each piece >> of the path. >> ... >> Trying using it in conjunction with >> File.expand_path and see if that works. >> > > I tried that before starting this thread > > Claudio > -- Try this: require 'pathname' path = Pathname.new('Test') path.each_entry { | f | p [f, f.exist?, f.expand_path, path.join(f), path.join(f).exist?] } # >> [#, true, #, #, true] # >> [#, true, #, #, true] # >> [#, false, #, #, true] It appears that each_entry yields just the basename, without any context. Regards, Sean