IRubyObject value = getValue(context, scope, name, index);
return value == null ? null : context.runtime.getDefinedMessage(DefinedMessage.CONSTANT);
}
public IRubyObject getValue(ThreadContext context, StaticScope scope, String name, int index) {
ConstantCache cache = constants[index];
return ConstantCache.isCached(cache) ? cache.value : reCache(context, scope, name, index);
}