public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block block) {
Ruby runtime = context.runtime;
IRubyObject object = (IRubyObject) getSource().retrieve(context, self, currDynScope, temp);
RubyClass cls = object.getMetaClass().getRealClass();
VariableAccessor localAccessor = accessor;
IRubyObject value;
if (localAccessor.getClassId() != cls.hashCode()) {
localAccessor = cls.getVariableAccessorForRead(getRef());
if (localAccessor == null) return runtime.getNil();
value = (IRubyObject)localAccessor.get(object);
accessor = localAccessor;
} else {
value = (IRubyObject)localAccessor.get(object);
}
return value == null ? runtime.getNil() : value;
}