Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel exit! has an optional argument #1298

Closed
noproblemwiththat opened this issue Apr 6, 2023 · 0 comments · Fixed by #1396
Closed

Kernel exit! has an optional argument #1298

noproblemwiththat opened this issue Apr 6, 2023 · 0 comments · Fixed by #1396
Labels
rbs Issues of RBS type definition
Milestone

Comments

@noproblemwiththat
Copy link

Investigating a seemingly spurious Ruby::InsufficientPositionalArguments from steep, I think I find an incorrect signature for exit!, in the kernel source:

static VALUE
rb_f_exit_bang(int argc, VALUE *argv, VALUE obj)
{
    int istatus;

    if (rb_check_arity(argc, 0, 1) == 1) {
        istatus = exit_status_code(argv[0]);
    }
    else {
        istatus = EXIT_FAILURE;
    }
    _exit(istatus);

    UNREACHABLE_RETURN(Qnil);
}

but the signature requires an argument

  def self?.exit!: (Integer | TrueClass | FalseClass status) -> bot
@soutaro soutaro added this to the RBS 3.2 milestone Apr 26, 2023
@soutaro soutaro added the rbs Issues of RBS type definition label Apr 26, 2023
ParadoxV5 added a commit to ParadoxV5/rbs that referenced this issue Jul 27, 2023
Fixes ruby#1298
The associated test is blank because – you can’t test this…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rbs Issues of RBS type definition
Development

Successfully merging a pull request may close this issue.

2 participants