@Override public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block block) { IRubyObject value = (IRubyObject) getObject().retrieve(context, self, currDynScope, temp); String name = getName().string; RubyString definedType = Helpers.getDefinedConstantOrBoundMethod(value, name); return definedType == null ? context.nil : new StringLiteral(definedType.getByteList()).retrieve(context, self, currDynScope, temp); }
@Override public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block block) { IRubyObject value = (IRubyObject) getObject().retrieve(context, self, currDynScope, temp); String name = getName().string; RubyString definedType = Helpers.getDefinedConstantOrBoundMethod(value, name); return definedType == null ? context.nil : new StringLiteral(definedType.getByteList()).retrieve(context, self, currDynScope, temp); }