public CompiledBlockCallback19 getBlockCallback19(String method, final String file, final int line, final Object scriptObject) {
try {
Class scriptClass = scriptObject.getClass();
final Method blockMethod = scriptClass.getMethod(method, scriptClass, ThreadContext.class, IRubyObject.class, IRubyObject[].class, Block.class);
return new CompiledBlockCallback19() {
public IRubyObject call(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) {
try {
return (IRubyObject)blockMethod.invoke(null, scriptObject, context, self, args, block);
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);