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
This happens on both Windows and OpenBSD, so is unlikely to be operating system specific:
jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 +jit [mswin32-x86_64]
jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 OpenJDK 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [OpenBSD-x86_64]
Expected Behavior
Zlib.inflate should work the same as Zlib::Inflate.inflate
$ jruby -vr zlib -e "p Zlib.inflate(Zlib.deflate('1'*1000)).length"
jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 OpenJDK 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [OpenBSD-x86_64]
Unhandled Java exception: java.lang.ClassCastException: org.jruby.RubyModule cannot be cast to org.jruby.RubyClass
java.lang.ClassCastException: org.jruby.RubyModule cannot be cast to org.jruby.RubyClass
s_inflate at org/jruby/ext/zlib/JZlibInflate.java:66
inflate at org/jruby/ext/zlib/RubyZlib.java:232
call at org/jruby/ext/zlib/RubyZlib$INVOKER$s$1$0$inflate.gen:-1
cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:344
call at org/jruby/runtime/callsite/CachingCallSite.java:170
invokeOther3:inflate at -e:1
<main> at -e:1
invokeWithArguments at java/lang/invoke/MethodHandle.java:627
load at org/jruby/ir/Compiler.java:94
runScript at org/jruby/Ruby.java:852
runNormally at org/jruby/Ruby.java:771
runNormally at org/jruby/Ruby.java:789
runFromMain at org/jruby/Ruby.java:601
doRunFromMain at org/jruby/Main.java:415
internalRun at org/jruby/Main.java:307
run at org/jruby/Main.java:234
main at org/jruby/Main.java:206
Zlib.inflate is supposed to be available since Ruby 2.0, but JRuby 9.2 is the first JRuby version that added support for it. Interestingly, Zlib.deflate works fine, maybe because support was added to ruby earlier (in 1.9.3).
The text was updated successfully, but these errors were encountered:
Environment
This happens on both Windows and OpenBSD, so is unlikely to be operating system specific:
Expected Behavior
Zlib.inflate
should work the same asZlib::Inflate.inflate
CRuby 2.0 - 2.6:
Actual Behavior
Zlib.inflate
is supposed to be available since Ruby 2.0, but JRuby 9.2 is the first JRuby version that added support for it. Interestingly,Zlib.deflate
works fine, maybe because support was added to ruby earlier (in 1.9.3).The text was updated successfully, but these errors were encountered: