private String getClassNameFromFrame(Frame current) { String klazzName; if (current.getKlazz() == null) { klazzName = UNKNOWN_NAME; } else { klazzName = current.getKlazz().getName(); } return klazzName; }
// XXX: Again, screwy evaling under previous frame's scope public void preExecuteUnder(RubyModule executeUnderClass, Block block) { Frame frame = getCurrentFrame(); pushRubyClass(executeUnderClass); DynamicScope scope = getCurrentScope(); StaticScope sScope = new BlockStaticScope(scope.getStaticScope()); sScope.setModule(executeUnderClass); pushScope(DynamicScope.newDynamicScope(sScope, scope)); pushCallFrame(frame.getKlazz(), frame.getName(), frame.getSelf(), block); getCurrentFrame().setVisibility(getPreviousFrame().getVisibility()); }