Skip to content

Commit

Permalink
[Fix rubocop#197] Disable Performance/ArraySemiInfiniteRangeSlice cop
Browse files Browse the repository at this point in the history
This cop was created due to a mistake in microbenchmark
Refer rubocop#175 (comment)

Closes rubocop#197, rubocop#198
  • Loading branch information
tejasbubane committed Nov 23, 2020
1 parent fd9e060 commit 2d4834c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## master (unreleased)

### Changes

* [#197](https://github.com/rubocop-hq/rubocop-performance/pull/197): Disable `Performance/ArraySemiInfiniteRangeSlice` cop. ([@tejasbubane][])

## 1.9.0 (2020-11-17)

### New features
Expand Down
6 changes: 5 additions & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ Performance/AncestorsInclude:

Performance/ArraySemiInfiniteRangeSlice:
Description: 'Identifies places where slicing arrays with semi-infinite ranges can be replaced by `Array#take` and `Array#drop`.'
Enabled: pending
# This cop was created due to a mistake in microbenchmark
# Refer https://github.com/rubocop-hq/rubocop-performance/pull/175#issuecomment-731892717
Enabled: false
# Unsafe for string slices because strings do not have `#take` and `#drop` methods
Safe: false
VersionAdded: '1.9'

Performance/BigDecimalWithNumericArgument:
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/cops_performance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ NOTE: Required Ruby version: 2.7
|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged

| Pending
| Yes
| Yes
| Disabled
| No
| Yes (Unsafe)
| 1.9
| -
|===
Expand Down

0 comments on commit 2d4834c

Please sign in to comment.