All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jruby.internal.runtime.methods.InterpretedMethod.arities.erb Maven / Gradle / Ivy

There is a newer version: 9.4.7.0
Show newest version
    @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 - 2024 Weber Informatics LLC | Privacy Policy