RubyClass rubyClass = performSingletonMethodChecks(runtime, receiver, name);
StaticScope scope = creatScopeForClass(context, scopeNames, required, optional, rest);
MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
DynamicMethod method = constructSingletonMethod(factory, rubyClass, javaName, arity, scope,scriptObject, callConfig);
rubyClass.addMethod(name, method);
callSingletonMethodHook(receiver,context, runtime.fastNewSymbol(name));