Skip to content

Commit e1e0311

Browse files
ahorekkares
authored andcommittedJul 6, 2018
zlib inflate fixes #5234 (#5237)
1 parent 6bdc55f commit e1e0311

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎core/src/main/java/org/jruby/ext/zlib/JZlibInflate.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public JZlibInflate(Ruby runtime, RubyClass type) {
6262

6363
@JRubyMethod(name = "inflate", required = 1, meta = true)
6464
public static IRubyObject s_inflate(ThreadContext context, IRubyObject recv, IRubyObject string) {
65-
RubyClass klass = (RubyClass) recv;
65+
RubyClass klass = (RubyClass)(recv.isClass() ? recv : context.runtime.getClassFromPath("Zlib::Inflate"));
6666
JZlibInflate inflate = (JZlibInflate) klass.allocate();
6767
inflate.init(JZlib.DEF_WBITS);
6868

0 commit comments

Comments
 (0)