Ilkka Laukkanen
2010-05-01 18:14:53 UTC
Hi,
I just noticed for the first time that if you have a symlink, say
"foo", that points at a directory, both
File.symlink? 'foo'
and
File.directory? 'foo'
return true. While this is a bit misleading in my opinion, it should
definitely be documented in File.directory?. So here's a tiny little
patch against trunk that documents this caveat in File#directory?.
What do you think?
I just noticed for the first time that if you have a symlink, say
"foo", that points at a directory, both
File.symlink? 'foo'
and
File.directory? 'foo'
return true. While this is a bit misleading in my opinion, it should
definitely be documented in File.directory?. So here's a tiny little
patch against trunk that documents this caveat in File#directory?.
What do you think?
--
Ilkka
Ilkka