C
Claudio Greco
Hi all,
I noticed that the following code
require 'pathname'
p = Pathname.new('Test')
p.each_entry { | f | puts f.exist? }
does not work as I would expect.
I'm expecting that any returned object exists otherwise it wouldn't be
returned.
If 'Test' is a folder containing a single file, the iterator returns
three objects, and rightly so: . .. and the file, but only the first two
objects (directories) exist, not the file. Is this the expected
behavior?
Thanks in advance,
Claudio
I noticed that the following code
require 'pathname'
p = Pathname.new('Test')
p.each_entry { | f | puts f.exist? }
does not work as I would expect.
I'm expecting that any returned object exists otherwise it wouldn't be
returned.
If 'Test' is a folder containing a single file, the iterator returns
three objects, and rightly so: . .. and the file, but only the first two
objects (directories) exist, not the file. Is this the expected
behavior?
Thanks in advance,
Claudio