JRuby

File.new does not support 3rd form (file descriptors)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.0.0RC2
  • Fix Version/s: JRuby 1.0.2, JRuby 1.1b1
  • Component/s: Core Classes/Modules
  • Labels:
    None
  • Environment:
    OS X 10.4.9, Java 1.5, JRuby rev 3672
  • Number of attachments :
    2

Description

This is valid in MRI:

fh = File.new(STDOUT.fileno, 'r')

Currently JRuby raises a TypeError, expecting a String only.

  1. fd.jruby-1_0.patch
    29/Oct/07 9:24 AM
    1 kB
    Riley Lynch
  2. fd.patch
    29/Oct/07 9:24 AM
    1 kB
    Riley Lynch

Activity

Hide
Charles Oliver Nutter added a comment -

Along with other file descriptor stuff, if this is possible we should fix it.

Show
Charles Oliver Nutter added a comment - Along with other file descriptor stuff, if this is possible we should fix it.
Hide
Riley Lynch added a comment -

Patches for trunk and jruby-1_0 branch, including test

Show
Riley Lynch added a comment - Patches for trunk and jruby-1_0 branch, including test
Hide
Charles Oliver Nutter added a comment -

Patch looks good, applied to trunk and 1.0 branch. Thanks!

Show
Charles Oliver Nutter added a comment - Patch looks good, applied to trunk and 1.0 branch. Thanks!

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: