Skip to content

Commit

Permalink
back-port-fix: make sure feedValue is always initialized
Browse files Browse the repository at this point in the history
kares committed Apr 19, 2017
1 parent bce1800 commit 58f9dc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/org/jruby/RubyEnumerator.java
Original file line number Diff line number Diff line change
@@ -248,12 +248,14 @@ public IRubyObject initialize20(ThreadContext context, IRubyObject[] args, Block
}

private IRubyObject initialize(IRubyObject object, IRubyObject method, IRubyObject[] methodArgs) {
final Ruby runtime = getRuntime();
this.object = object;
this.method = method.asJavaString();
this.methodArgs = methodArgs;
this.feedValue = runtime.getNil();
setInstanceVariable("@__object__", object);
setInstanceVariable("@__method__", method);
setInstanceVariable("@__args__", RubyArray.newArrayNoCopyLight(getRuntime(), methodArgs));
setInstanceVariable("@__args__", RubyArray.newArrayNoCopyLight(runtime, methodArgs));
return this;
}

0 comments on commit 58f9dc9

Please sign in to comment.