Skip to content
Permalink
Browse files
get some types right [skip ci]
  • Loading branch information
mkristian committed Dec 6, 2014
1 parent 5b14079 commit 41120f194f84e19ccdef58474703e5f1f42860f2
Showing with 6 additions and 5 deletions.
  1. +4 −3 core/src/main/java/org/jruby/runtime/load/CompiledScriptLoader.java
  2. +2 −2 core/src/main/java/org/jruby/util/OneShotClassLoader.java
@@ -9,10 +9,11 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;

import org.jruby.Ruby;
import org.jruby.ast.executable.Script;
import org.jruby.util.JRubyClassLoader;
import org.jruby.util.OneShotClassLoader;
import org.jruby.util.ClassDefininngJRubyClassLoader;
import org.objectweb.asm.ClassReader;

/**
@@ -31,9 +32,9 @@ public static Script loadScriptFromFile(Ruby runtime, InputStream inStream, Stri
baos.write(buf, 0, read);
}
buf = baos.toByteArray();
ClassDefininngJRubyClassLoader jcl = runtime.getJRubyClassLoader();
JRubyClassLoader jcl = runtime.getJRubyClassLoader();
OneShotClassLoader oscl = new OneShotClassLoader(jcl);

ClassReader cr = new ClassReader(buf);
String className = cr.getClassName().replace('/', '.');

@@ -5,11 +5,11 @@
*/
public class OneShotClassLoader extends ClassLoader implements ClassDefiningClassLoader {

public OneShotClassLoader(ClassDefininngJRubyClassLoader parent) {
public OneShotClassLoader(JRubyClassLoader parent) {
super(parent);
}

public Class<?> defineClass(String name, byte[] bytes) {
return super.defineClass(name, bytes, 0, bytes.length, ClassDefininngJRubyClassLoader.DEFAULT_DOMAIN);
}
}
}

0 comments on commit 41120f1

Please sign in to comment.