Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6da2fed17aba
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dd69e08b7a1e
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 4, 2014

  1. Copy the full SHA
    74b86d6 View commit details
  2. Copy the full SHA
    dd69e08 View commit details
Showing with 9 additions and 2 deletions.
  1. +4 −2 core/src/main/java/org/jruby/Ruby.java
  2. +5 −0 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
6 changes: 4 additions & 2 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -790,7 +790,7 @@ private ScriptAndCode tryCompile(Node node, JRubyClassLoader classLoader) {
LOG.error(e);
}
}
return null;
return new ScriptAndCode(null, null);
}
}

@@ -2867,6 +2867,7 @@ public void compileAndLoadFile(String filename, InputStream in, boolean wrap) {

try {
Script script = null;
ScriptAndCode scriptAndCode = null;
String className = null;

try {
@@ -2910,7 +2911,8 @@ public void compileAndLoadFile(String filename, InputStream in, boolean wrap) {
// script was not found in cache above, so proceed to compile
Node scriptNode = parseFile(readStream, filename, null);
if (script == null) {
script = tryCompile(scriptNode, new JRubyClassLoader(jrubyClassLoader)).script();
scriptAndCode = tryCompile(scriptNode, new JRubyClassLoader(jrubyClassLoader));
if (scriptAndCode != null) script = scriptAndCode.script();
}

if (script == null) {
5 changes: 5 additions & 0 deletions core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Original file line number Diff line number Diff line change
@@ -1974,6 +1974,11 @@ public void NthRef(NthRef nthref) {
jvmMethod().invokeIRHelper("nthMatch", sig(IRubyObject.class, ThreadContext.class, int.class));
}

@Override
public void Null(Null nul) {
jvmAdapter().aconst_null();
}

@Override
public void ObjectClass(ObjectClass objectclass) {
jvmMethod().pushObjectClass();