Skip to content

Commit

Permalink
Fixed #4465. Java Null Pointer exception while bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Feb 10, 2017
1 parent 948554d commit 675adb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/org/jruby/Ruby.java
Expand Up @@ -55,6 +55,7 @@
import org.jruby.ext.thread.ThreadLibrary;
import org.jruby.ir.IRScope;
import org.jruby.ir.IRScriptBody;
import org.jruby.ir.instructions.Instr;
import org.jruby.javasupport.JavaSupport;
import org.jruby.javasupport.JavaSupportImpl;
import org.jruby.lexer.yacc.ISourcePosition;
Expand Down Expand Up @@ -1180,7 +1181,8 @@ private void init() {
// FIXME: This registers itself into static scope as a side-effect. Let's make this
// relationship handled either more directly or through a descriptice method
// FIXME: We need a failing test case for this since removing it did not regress tests
new IRScriptBody(irManager, "", context.getCurrentScope().getStaticScope());
IRScope top = new IRScriptBody(irManager, "", context.getCurrentScope().getStaticScope());
top.allocateInterpreterContext(new ArrayList<Instr>());

// Initialize the "dummy" class used as a marker
dummyClass = new RubyClass(this, classClass);
Expand Down

0 comments on commit 675adb2

Please sign in to comment.