Skip to content

Commit a54741f

Browse files
ahorekkares
authored andcommittedJul 6, 2018
zlib inflate fixes #5234 (#5237)
1 parent 8ed1cb7 commit a54741f

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
@@ -63,7 +63,7 @@ public JZlibInflate(Ruby runtime, RubyClass type) {
6363

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

0 commit comments

Comments
 (0)
Please sign in to comment.