Issue 47: Extensions loaded using wrong classloader #96

consiliens opened this Issue Aug 26, 2011 · 0 comments


None yet

1 participant


"Reported by project member, Mar 29, 2011
What steps will reproduce the problem?

  1. Compile class "A" that defines a macro.
  2. Compile another file that references class A

Loading the extension class fails:
java.lang.NoClassDefFoundError: duby/lang/compiler/Macro (Mirah::InternalCompilerError)

The problem is in lib/mirah/jvm/types/intrinsics.rb. When loading extensions from disk it uses this code:

The problem is that class_name is likely in the system classpath, but it needs to be loaded from the JRubyClassLoader because that's where the mirah jars are.

We really need an isolated class loader that only includes the bootstrap classpath and the compilation classpath."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment