This is probably a stupid easy to answer question but it’s late Is
there an exception raised when you do not have permission to access a
file? There probably is but I’m too tired to think straight.
Hi,
···
At Tue, 27 Aug 2002 12:02:27 +0900, Robert Warning wrote:
This is probably a stupid easy to answer question but it’s late Is
there an exception raised when you do not have permission to access a
file? There probably is but I’m too tired to think straight.
$ ruby -e ‘open(“/etc/shadow”)’
-e:1:in initialize': Permission denied - "/etc/shadow" (Errno::EACCES) from -e:1:in
open’
from -e:1
–
Nobu Nakada
Robert Warning wrote:
This is probably a stupid easy to answer question but it’s late Is
there an exception raised when you do not have permission to access a
file? There probably is but I’m too tired to think straight.
Sorry to bother anyone with this. I answered my own question with
Errno::EACCES. Sorry
It’s worth pointing out, if I may, that this sort of question is easily
answered by experimentation, using irb.
If you don’t know what irb is, you need it!
Gavin
···
----- Original Message -----
From: “Robert Warning” cleeker@gmx.net
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Tuesday, August 27, 2002 2:02 PM
Subject: Re: Exceptions
Robert Warning wrote:
This is probably a stupid easy to answer question but it’s late Is
there an exception raised when you do not have permission to access a
file? There probably is but I’m too tired to think straight.Sorry to bother anyone with this. I answered my own question with
Errno::EACCES. Sorry