Attempting File.open('foo', 'w') when './foo' is a directory raises
Errno:ERNOENT, but should raise Errno:EISDIR
----------------------------------------------------------------------------------------------------------------
Key: JRUBY-1368
URL: http://jira.codehaus.org/browse/JRUBY-1368
Project: JRuby
Issue Type: Bug
Components: Miscellaneous
Environment: JRuby rev 4334
Reporter: Alexey Verkhovsky
Assignee: Thomas E Enebo
Priority: Minor
* MRI *
[EMAIL PROTECTED]:~$ ruby -e "File.open('./foo', 'w') { |f| 1000.time f.puts
'quick brown fox' }"
-e:1: warning: parenthesize argument(s) for future version
-e:1:in `initialize': Is a directory - ./foo (Errno::EISDIR)
from -e:1:in `open'
from -e:1
*JRuby *
[EMAIL PROTECTED]:~$ jruby -e "File.open('./foo', 'w') { |f| 1000.time f.puts
'quick brown fox' }"
-e:1 warning: parenthesize argument(s) for future version
-e:1:in `open': File not found (Errno::ENOENT)
Note the wrong error (file not found makes no sense for File.open with 'w'
flag)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email