-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
has_key? deprecated? #3224
Comments
Looking at the doc and source, seems like |
If Matz said it is deprecated, we should assume it won't be in Ruby 3. The only thing missing is a note in the Ruby documentation. |
Although I prefer |
9 tasks
tejasbubane
added a commit
to tejasbubane/rubocop
that referenced
this issue
Jun 16, 2016
Fixes rubocop#3224 As stated by Matz in the discussion in rubocop#3224, the methods `Hash#has_key?` and `Hash#has_value?` will not be deprecated. Hence rename the cop and corresponding messages to not use the word deprecated.
bastelfreak
added a commit
to bastelfreak/modulesync_config
that referenced
this issue
Jun 30, 2016
Rename Style/DeprecatedHashMethods to Style/PreferredHashMethods. this change happend in the last rubocop release rubocop/rubocop#3224
Neodelf
pushed a commit
to Neodelf/rubocop
that referenced
this issue
Oct 15, 2016
…ubocop#3226) Fixes rubocop#3224 As stated by Matz in the discussion in rubocop#3224, the methods `Hash#has_key?` and `Hash#has_value?` will not be deprecated. Hence rename the cop and corresponding messages to not use the word deprecated.
yakschuss
added a commit
to yakschuss/guides
that referenced
this issue
Oct 30, 2016
This change was officially made in June, and raises a warning when running rubocop. "Warning: unrecognized cop Style/DeprecatedHashMethods" rubocop/rubocop#3224
geoffharcourt
pushed a commit
to thoughtbot/guides
that referenced
this issue
Jan 12, 2017
This change was officially made in June, and raises a warning when running rubocop. "Warning: unrecognized cop Style/DeprecatedHashMethods" rubocop/rubocop#3224
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Style/DeprecatedHashMethods
cop says, thathas_key?
is deprecated in favor ofkey?
, citing a four year old message from @matz: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/43765The ruby 2.3.1 documentation does not mention the deprecation and
has_key?
is mentioned all over the place, even as example forkey?
: http://ruby-doc.org/core-2.3.1/Hash.html#method-i-key-3FSo is this really deprecated?
The text was updated successfully, but these errors were encountered: