Skip to content

Add a shim for Proc#ruby2_keywords - #3

Merged
nobu merged 2 commits into
ruby:masterfrom
mame:proc-ruby2_keywords
Jan 8, 2020
Merged

Add a shim for Proc#ruby2_keywords#3
nobu merged 2 commits into
ruby:masterfrom
mame:proc-ruby2_keywords

Conversation

@mame

@mame mame commented Jan 3, 2020

Copy link
Copy Markdown
Member

No description provided.

Comment thread lib/ruby2_keywords.rb Outdated
end

class Proc
def ruby2_keywords

Copy link
Copy Markdown
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.

Comment thread lib/ruby2_keywords.rb
unless method_defined?(:ruby2_keywords)
def ruby2_keywords
self
end

Copy link
Copy Markdown
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
Copy Markdown
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