Skip to content

Support forwarded arguments in calls and super#415

Closed
pvcresin wants to merge 1 commit intoruby:masterfrom
pvcresin:fix_forwarding_arguments
Closed

Support forwarded arguments in calls and super#415
pvcresin wants to merge 1 commit intoruby:masterfrom
pvcresin:fix_forwarding_arguments

Conversation

@pvcresin
Copy link
Copy Markdown
Contributor

@pvcresin pvcresin commented Apr 3, 2026

Known issue: forwarding-arguments

Summary

  • support Ruby argument forwarding with ...
  • forward arguments through method calls, super, and nested blocks
## update
def foo(...)
  1.times { bar(...) }
end

def bar(*a, **b)
  [a, b]
end

foo(1, x: 4, y: 5)

## assert
class Object
  def foo: (*Integer, **Integer) -> Integer
  def bar: (*Integer, **Integer) -> [Array[Integer], { x: Integer, y: Integer }]
end

Design

  • treat ... as forwarded actual arguments
  • avoid spreading forwarding-specific state across LocalEnv
  • keep anonymous block forwarding (&) separate from ...

Co-authored-by: OpenAI Codex <codex@openai.com>
@pvcresin
Copy link
Copy Markdown
Contributor Author

pvcresin commented Apr 3, 2026

I think I need a little more time to refine the strategy, so I’ll close this for now.

@pvcresin pvcresin closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant