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

Support keyword arguments support partially #182

Merged
merged 1 commit into from
May 22, 2024
Merged

Conversation

euglena1215
Copy link
Contributor

@euglena1215 euglena1215 commented May 20, 2024

Previously, methods defined with keyword arguments would have their keyword arguments ignored.

def foo(x:)
  x.to_i
end

def foo: -> Integer

With the added support for keyword arguments, keyword arguments can now be interpreted.
However, the following are not yet supported

  • Method calls with keyword arguments
    keyword_hash_node because it does not support.
  • Optional keyword arguments
    The scenario test RuntimeError: AST diff does not work well; the completely same code generates a different AST is annoying me and I gave up.

@euglena1215

This comment was marked as outdated.

@euglena1215 euglena1215 marked this pull request as draft May 20, 2024 10:31
Previously, methods defined with keyword arguments would have their keyword arguments ignored.

```rb
def foo(x:)
  x.to_i
end
```

→

```
def foo: -> Integer
```

With the added support for keyword arguments, keyword arguments can now be interpreted.
However, the following are not yet supported

- Method calls with keyword arguments
  keyword_hash_node because it does not support.
- Optional keyword arguments
  The scenario test `RuntimeError: AST diff does not work well; the completely same code generates a different AST` is annoying me and I gave up.
@euglena1215 euglena1215 changed the title Support for Keyword Arguments Support keyword arguments support partially May 21, 2024
@euglena1215 euglena1215 marked this pull request as ready for review May 21, 2024 01:06
@mame mame merged commit 1fe112b into ruby:v2 May 22, 2024
6 checks passed
@mame
Copy link
Member

mame commented May 22, 2024

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants