Skip to content

10.1.3.0: keyword-argument call inside a (...) method raises ArgumentError #10026

Open

Description

@mensfeld

Versions: JRuby 10.1.3.0 (3db52d0), OpenJDK 21, x86_64-linux. Works on 10.1.2.0 and 10.0.8.0, CRuby 3.4.12 and 4.0.9.

Minimal repro:

def kw(x:) = x
def no_forward(...) = kw(x: 1)
def with_forward(...) = (p(...); kw(x: 1))
p no_forward
p with_forward

Expected: 1 and 1.

Actual: ArgumentError: wrong number of arguments (given 1, expected 0) from both calls. The keywords reach kw as one positional Hash when the caller's own signature is (...), even when ... is never forwarded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions