Issue Type: Bug Bug
Assignee: Thomas E Enebo
Created: 15/Jun/12 12:08 PM
Description:

$ cat repro.rb

File.open('/dev/nst5', 'w')

innocent enough (/dev/nst5 is a scsi tape device)

succeeds with MRI:

$ sudo java -jar jruby-complete-1.7.0.preview1.jar repro.rb
IOError: Invalid argument
initialize at org/jruby/RubyFile.java:315
open at org/jruby/RubyIO.java:1109
(root) at repro.rb:1

succeeds with MRI:

pac...@app001.app.prod.dps:~/temp$ sudo ~/installs/bin/ruby -v repro.rb
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
$

Test: is this a recent change to jruby?

$ sudo java -jar ~/jruby-complete-1.5.0.jar repro.rb
repro.rb:1:in `initialize': Invalid argument (IOError)
from repro.rb:1:in `open'
from repro.rb:1

Doesn't appear so. The device doesn't like the way it's trying to open, for some reason, (mode "w" or "wb" same thing, "r" mode seems to open the descriptor all right). "normal java" classes using standard filewriters can open ok [1], so I presume it's some type of jruby thing. Sorry this one's a bit difficult to test, but I'd be happy to try anything given.

[1] https://gist.github.com/2937606

Environment: jruby 1.5.0 (ruby 1.8.7 patchlevel 249) (2010-05-12 6586) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_20) [amd64-java]
Project: JRuby
Priority: Major Major
Reporter: Roger Pack
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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

Reply via email to