Skip to content

Commit

Permalink
[Fix rubocop#6359] Mark StylePreferredHashMethods as unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
tejasbubane committed May 15, 2019
1 parent ed3b9c8 commit 24c841f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
* [#7013](https://github.com/rubocop-hq/rubocop/pull/7013): Respect DisabledByDefault for custom cops. ([@XrXr][])
* [#7043](https://github.com/rubocop-hq/rubocop/issues/7043): Prevent RDoc error when installing RuboCop 0.69.0 on Ubuntu. ([@koic][])

### Changes

* [#6359](https://github.com/rubocop-hq/rubocop/issues/6359): Mark `Style/PreferredHashMethods` as unsafe. ([@tejasbubane][])

## 0.69.0 (2019-05-13)

### New features
Expand Down
3 changes: 2 additions & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3753,8 +3753,9 @@ Style/PreferredHashMethods:
Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
StyleGuide: '#hash-key'
Enabled: true
Safe: false
VersionAdded: '0.41'
VersionChanged: '0.44'
VersionChanged: '0.70'
EnforcedStyle: short
SupportedStyles:
- short
Expand Down
2 changes: 1 addition & 1 deletion manual/cops_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -4711,7 +4711,7 @@ puts Regexp.last_match(1)
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
--- | --- | --- | --- | ---
Enabled | Yes | Yes | 0.41 | 0.44
Enabled | No | Yes | 0.41 | 0.70
This cop (by default) checks for uses of methods Hash#has_key? and
Hash#has_value? where it enforces Hash#key? and Hash#value?
Expand Down

0 comments on commit 24c841f

Please sign in to comment.