protected Object interpretSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) { RubyBasicObject objClass = context.runtime.getObject(); // We have to rely on the frame stack to find the implementation class RubyModule klazz = context.getFrameKlazz(); String methodName = context.getCurrentFrame().getName(); checkSuperDisabledOrOutOfMethod(context, klazz, methodName); RubyClass superClass = Helpers.findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass(); DynamicMethod method = superClass != null ? superClass.searchMethod(methodName) : UndefinedMethod.INSTANCE; Object rVal = method.isUndefined() ? Helpers.callMethodMissing(context, self, method.getVisibility(), methodName, CallType.SUPER, args, block) : method.call(context, self, superClass, methodName, args, block); return hasUnusedResult() ? null : rVal; }
protected Object interpretSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) { RubyBasicObject objClass = context.runtime.getObject(); // We have to rely on the frame stack to find the implementation class RubyModule klazz = context.getFrameKlazz(); String methodName = context.getCurrentFrame().getName(); checkSuperDisabledOrOutOfMethod(context, klazz, methodName); RubyClass superClass = Helpers.findImplementerIfNecessary(self.getMetaClass(), klazz).getSuperClass(); DynamicMethod method = superClass != null ? superClass.searchMethod(methodName) : UndefinedMethod.INSTANCE; Object rVal = method.isUndefined() ? Helpers.callMethodMissing(context, self, method.getVisibility(), methodName, CallType.SUPER, args, block) : method.call(context, self, superClass, methodName, args, block); return hasUnusedResult() ? null : rVal; }