This is valid in MRI:
fh = File.new(STDOUT.fileno, 'r')
Currently JRuby raises a TypeError, expecting a String only.
Along with other file descriptor stuff, if this is possible we should fix it.
Patches for trunk and jruby-1_0 branch, including test
Patch looks good, applied to trunk and 1.0 branch. Thanks!