Class compiledClass = scriptObject.getClass();
Ruby runtime = context.runtime;
RubyClass rubyClass = performSingletonMethodChecks(runtime, receiver, name);
MethodFactory factory = MethodFactory.createFactory(compiledClass.getClassLoader());
DynamicMethod method = constructSingletonMethod(
factory, javaName, rubyClass,
new SimpleSourcePosition(filename, line), arity, scope,
scriptObject, callConfig, parameterDesc);