Michael Malone
4/6/2009 2:03:00 AM
Humphrey Alba wrote:
> Version: ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
> Is there something wrong with this version?
>
> 1:
> Dir.foreach("/tmp") {|f| puts f if File.directory?(f) }
> -- it just prints '.' and '..'
>
Have you checked to see if you do have directories inside /tmp other
than '.' and '..'?
> 2:
> puts Dir.tmpdir
> Dir.mktmpdir { |i| puts i }
> -- it says 'undefined
As for "undefined method" you're quite right, I can't find Dir#tmpdir
defined anywhere either, and yet it's in the docs...what's the deal guys?
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================