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

Update description around removed Hash#index since Ruby 3.0+ #2705

Merged
merged 1 commit into from
May 22, 2022
Merged

Update description around removed Hash#index since Ruby 3.0+ #2705

merged 1 commit into from
May 22, 2022

Conversation

kachick
Copy link
Contributor

@kachick kachick commented May 20, 2022

ref: ruby/ruby@547c71d
現状のリストには挙がっていませんが、 #2458 の一環と言うことになるのでしょうか。

ruby -v -e '{}.index(0)'
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
-e:1: warning: Hash#index is deprecated; use Hash#key insteadruby -v -e '{}.index(0)'
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux]
-e:1:in `<main>': undefined method `index' for {}:Hash (NoMethodError)

Before this PR

Before-Hash-2 7 0

Before-Hash-3 0

After this PR

After-Hash-2 7 0

After-Hash-3 0

@znz znz merged commit b8a7efd into rurema:master May 22, 2022
@kachick
Copy link
Contributor Author

kachick commented May 22, 2022

ありがとうございます!

@kachick kachick deleted the update-hash-index branch May 22, 2022 03:04
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.

2 participants