Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.0.2, JRuby 1.1b1
-
Component/s: Miscellaneous
-
Labels:None
-
Environment:JRuby rev 4334
-
Number of attachments :
Description
- MRI *
alexeyv@alexeyv-laptop:~$ 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 *
alexeyv@alexeyv-laptop:~$ 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)
I'll fix it if you provide a neat test case for it....