Feature #2408
closedbetter error reporting in windows when you try to run a directory
Description
=begin
Currently in linux, you may get this:
$ ruby -c wbo_backup
ruby: Is a directory - wbo_backup (Errno::EISDIR)
however we are not so fortunate in windows
C:\dev\ruby\p2pwebclient\documents\writeup\final>ruby logs
ruby: Permission denied -- logs (LoadError)
It would be nice to get a similar error message in windows.
Thanks!
-r
=end
Updated by vvs (Vladimir Sizikov) about 15 years ago
=begin
Yeah, all MRI versions from 1.8.6, through 1.8.7, 1.9.0, 1.9.1, 1.9.2-dev, all report "Permission denied" on Windows. Except for cygwin ruby :) Actually, even JRuby reports Permission denied.
This difference between platforms is indeed unfortunate.
=end
Updated by ujihisa (Tatsuhiro Ujihisa) about 15 years ago
- Status changed from Open to Assigned
- Assignee set to usa (Usaku NAKAMURA)
=begin
=end
Updated by usa (Usaku NAKAMURA) about 15 years ago
- Status changed from Assigned to Open
- Assignee deleted (
usa (Usaku NAKAMURA))
=begin
On some platforms which allow to read directory entry, such errors occurs.
% ruby18 tmp
tmp:1: Invalid char \027' in expression tmp:1: Invalid char
\001' in expression
% ruby19 tmp
tmp:1: Invalid char \x17' in expression tmp:1: Invalid char
\x01' in expression
tmp:1:in <main>': undefined local variable or method
xy' for main:Object (NameError)
So, this is not Windows issue.
=end
Updated by znz (Kazuhiro NISHIYAMA) over 14 years ago
- Category set to core
- Target version set to 2.0.0
=begin
=end
Updated by mame (Yusuke Endoh) over 12 years ago
- Description updated (diff)
- Assignee set to nobu (Nobuyoshi Nakada)
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r35131.
Roger, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- ruby.c (load_file_internal): bail out if the script is a directory.
[Feature #2408][ruby-core:26925]