History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1048
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Marcin Mielzynski
Reporter: Daniel Berger
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

Calling IO.new with invalid file descriptor raises NativeException

Created: 31/May/07 07:29 PM   Updated: 14/Dec/07 03:12 PM
Component/s: Core Classes/Modules
Affects Version/s: JRuby 1.0.0RC2
Fix Version/s: JRuby 1.0.4

Time Tracking:
Not Specified

File Attachments: 1. Text File 1048.patch (1 kb)

Environment: OS X 10.4.9, Java 1.5, 2007-05-31 rev 3672


 Description  « Hide
Calling IO.new with an invalid file descriptor should raise a SystemCallError. Currently JRuby raises a NativeException.
IO.new(999) # => Should raise SystemCallError


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Bengtsson - 02/Jun/07 04:47 PM
Attached patch fixes the NPE.

It gives IOError instead of the right subclass of SystemCallError though.


Charles Oliver Nutter - 23/Oct/07 01:45 PM
If we can support this the right way, we should try to do it in 1.1 and 1.0.2. If not, we should always raise a normal error like SystemCallError.

Charles Oliver Nutter - 30/Oct/07 01:52 AM
I fixed the NPE as in Anders' patch, but didn't get the SystemCallError throwing. Moving off 1.0.2 for that part of the issue, since it's pretty minor.