You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ jruby -v
jruby 9.1.17.0 (2.3.3) 2018-04-20 d8b1ff9 Java HotSpot(TM) 64-Bit Server VM 25.40-b25 on 1.8.0_40-b27 +jit [darwin-x86_64]
$ uname -a
Darwin Jankos-MacBook-Pro-2.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
Expected Behavior
IO.copy_stream on MRI accepts any object that responds to either #read or #readpartial as the source, so the following script works:
JRuby raises an exception when executing the above script:
ArgumentError: Should be String or IO
copy_stream at org/jruby/RubyIO.java:4222
<main> at script.rb:13
If I add a FakeIO#read method, the script executes without exceptions, and it calls FakeIO#read (MRI and Rubinius choose FakeIO#readpartial if both #read and #readpartial are available). It would be nice if JRuby supported #readpartial as well, it's needed for this PR.
The text was updated successfully, but these errors were encountered:
Environment
Expected Behavior
IO.copy_stream
on MRI accepts any object that responds to either#read
or#readpartial
as the source, so the following script works:Actual Behavior
JRuby raises an exception when executing the above script:
If I add a
FakeIO#read
method, the script executes without exceptions, and it callsFakeIO#read
(MRI and Rubinius chooseFakeIO#readpartial
if both#read
and#readpartial
are available). It would be nice if JRuby supported#readpartial
as well, it's needed for this PR.The text was updated successfully, but these errors were encountered: