StaticScope sco = new LocalStaticScope(null);
sco.setVariables(bytecodes[ip].iseq_op.locals);
YARVMethod newMethod = new YARVMethod(containingClass, bytecodes[ip].iseq_op, sco, visibility);
containingClass.addMethod(mname, newMethod);
if (context.getCurrentVisibility() == Visibility.MODULE_FUNCTION) {
RubyModule singleton = containingClass.getSingletonClass();
singleton.addMethod(mname, new WrapperMethod(singleton, newMethod, Visibility.PUBLIC));
containingClass.callMethod(context, "singleton_method_added", runtime.fastNewSymbol(mname));