Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
import org.jruby.truffle.runtime.LexicalScope;
import org.jruby.truffle.runtime.ModuleOperations;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.control.RaiseException;
import org.jruby.truffle.runtime.core.RubyClass;
import org.jruby.truffle.runtime.core.RubyModule;

@@ -48,9 +49,8 @@ public Object execute(VirtualFrame frame) {
final Object value = ModuleOperations.lookupClassVariable(module, name);

if (value == null) {
// TODO(CS): is this right?
// TODO: NameError!
return nil();
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().nameErrorUninitializedClassVariable(module, name, this));
}

return value;

0 comments on commit 52250e5

Please sign in to comment.