public String getFrameName() { return getCurrentFrame().getName(); }
public String getFrameName() { return getCurrentFrame().getName(); }
public String getFrameName() { return getCurrentFrame().getName(); }
public String getFrameName() { return getCurrentFrame().getName(); }
public void pushEvalSimpleFrame(IRubyObject executeObject) { Frame frame = getCurrentFrame(); pushCallFrame(frame.getKlazz(), frame.getName(), executeObject, Block.NULL_BLOCK); }
public void pushEvalSimpleFrame(IRubyObject executeObject) { Frame frame = getCurrentFrame(); pushCallFrame(frame.getKlazz(), frame.getName(), executeObject, Block.NULL_BLOCK); }
public static IRubyObject unresolvedSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) { // We have to rely on the frame stack to find the implementation class RubyModule klazz = context.getFrameKlazz(); String methodName = context.getCurrentFrame().getName(); Helpers.checkSuperDisabledOrOutOfMethod(context, klazz, methodName); RubyModule implMod = Helpers.findImplementerIfNecessary(self.getMetaClass(), klazz); RubyClass superClass = implMod.getSuperClass(); DynamicMethod method = superClass != null ? superClass.searchMethod(methodName) : UndefinedMethod.INSTANCE; IRubyObject rVal; if (method.isUndefined()) { rVal = Helpers.callMethodMissing(context, self, method.getVisibility(), methodName, CallType.SUPER, args, block); } else { rVal = method.call(context, self, superClass, methodName, args, block); } return rVal; }
public static IRubyObject unresolvedSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) { // We have to rely on the frame stack to find the implementation class RubyModule klazz = context.getFrameKlazz(); String methodName = context.getCurrentFrame().getName(); Helpers.checkSuperDisabledOrOutOfMethod(context, klazz, methodName); RubyModule implMod = Helpers.findImplementerIfNecessary(self.getMetaClass(), klazz); RubyClass superClass = implMod.getSuperClass(); DynamicMethod method = superClass != null ? superClass.searchMethod(methodName) : UndefinedMethod.INSTANCE; IRubyObject rVal; if (method.isUndefined()) { rVal = Helpers.callMethodMissing(context, self, method.getVisibility(), methodName, CallType.SUPER, args, block); } else { rVal = method.call(context, self, superClass, methodName, args, block); } return rVal; }
public void preExecuteUnder(IRubyObject executeUnderObj, RubyModule executeUnderClass, Block block) { Frame frame = getCurrentFrame(); DynamicScope scope = getCurrentScope(); StaticScope sScope = runtime.getStaticScopeFactory().newBlockScope(scope.getStaticScope()); sScope.setModule(executeUnderClass); pushScope(DynamicScope.newDynamicScope(sScope, scope)); pushCallFrame(frame.getKlazz(), frame.getName(), executeUnderObj, block); getCurrentFrame().setVisibility(getPreviousFrame().getVisibility()); }
public void preExecuteUnder(IRubyObject executeUnderObj, RubyModule executeUnderClass, Block block) { Frame frame = getCurrentFrame(); DynamicScope scope = getCurrentScope(); StaticScope sScope = runtime.getStaticScopeFactory().newBlockScope(scope.getStaticScope()); sScope.setModule(executeUnderClass); pushScope(DynamicScope.newDynamicScope(sScope, scope)); pushCallFrame(frame.getKlazz(), frame.getName(), executeUnderObj, block); getCurrentFrame().setVisibility(getPreviousFrame().getVisibility()); }
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; }
public void preExecuteUnder(RubyModule executeUnderClass, Block block) { Frame frame = getCurrentFrame(); pushRubyClass(executeUnderClass); DynamicScope scope = getCurrentScope(); StaticScope sScope = runtime.getStaticScopeFactory().newBlockScope(scope.getStaticScope()); sScope.setModule(executeUnderClass); pushScope(DynamicScope.newDynamicScope(sScope, scope)); pushCallFrame(frame.getKlazz(), frame.getName(), frame.getSelf(), block); getCurrentFrame().setVisibility(getPreviousFrame().getVisibility()); }
public void preExecuteUnder(RubyModule executeUnderClass, Block block) { Frame frame = getCurrentFrame(); pushRubyClass(executeUnderClass); DynamicScope scope = getCurrentScope(); StaticScope sScope = runtime.getStaticScopeFactory().newBlockScope(scope.getStaticScope()); sScope.setModule(executeUnderClass); pushScope(DynamicScope.newDynamicScope(sScope, scope)); pushCallFrame(frame.getKlazz(), frame.getName(), frame.getSelf(), block); getCurrentFrame().setVisibility(getPreviousFrame().getVisibility()); }