Skip to content

Add a shim for Proc#ruby2_keywords #3

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

Merged
merged 2 commits into from
Jan 8, 2020
Merged

Conversation

mame
Copy link
Member

@mame mame commented Jan 3, 2020

No description provided.

@@ -13,3 +13,9 @@ def main.ruby2_keywords(*)
# nil
end
end

class Proc
def ruby2_keywords
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it needs respond_to? guard like other polyfills.

unless method_defined?(:ruby2_keywords)
def ruby2_keywords
self
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about alias ruby2_keywords itself?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care either

@nobu nobu merged commit 07e126e into ruby:master Jan 8, 2020
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.

4 participants