org.jruby.internal.runtime.methods.InterpretedMethod.arities.erb Maven / Gradle / Ivy
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name<%= n_args_in(arity) %>) {
Ruby runtime = context.getRuntime();
try {
pre(context, name, self, Block.NULL_BLOCK, runtime);
argsNode.checkArgCount(runtime, <%= arity %>);
argsNode.prepare(context, runtime, self<%= n_args_out(arity) %>, Block.NULL_BLOCK);
return body.interpret(runtime, context, self, Block.NULL_BLOCK);
} catch (JumpException.ReturnJump rj) {
return handleReturn(context, rj);
} catch (JumpException.RedoJump rj) {
return handleRedo(runtime);
} finally {
post(runtime, context, name);
}
}
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name<%= n_args_in(arity) %>, Block block) {
Ruby runtime = context.getRuntime();
try {
pre(context, name, self, block, runtime);
argsNode.checkArgCount(runtime, <%= arity %>);
argsNode.prepare(context, runtime, self<%= n_args_out(arity) %>, block);
return body.interpret(runtime, context, self, block);
} catch (JumpException.ReturnJump rj) {
return handleReturn(context, rj);
} catch (JumpException.RedoJump rj) {
return handleRedo(runtime);
} finally {
post(runtime, context, name);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy