rubocop-performance 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 330b6db292d0709ef76d23cae8b7e84b24413d315b356a10a8a8596859b366ce
|
4
|
+
data.tar.gz: 32e9f148b06d630da9233b4fab33ea142eb0aa1006cd7cc311aafadabfe3c8fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fddb07ffb4b9ab812d7fcc454f36b3d70fe016783b9cbd863bd0a1391266a39177831b62afb2e35fd4cabc76c94a9b97108177f03ad809a09b69af58365d10dc
|
7
|
+
data.tar.gz: 1f2375b3dc17a9053a3219a04c45b7f5dee9a99ce472d2e38383c50f463dd8c8c716b6bf558eb6f4245abca24b2d89391ea6fa7fe131dbd0bc7b9eaa2fb994cf
|
@@ -32,11 +32,11 @@ module RuboCop
|
|
32
32
|
# make `count` work with a block is to call `to_a.count {...}`.
|
33
33
|
#
|
34
34
|
# Example:
|
35
|
-
# Model.where(id: [1, 2, 3].select { |m| m.method == true }.size
|
35
|
+
# `Model.where(id: [1, 2, 3]).select { |m| m.method == true }.size`
|
36
36
|
#
|
37
37
|
# becomes:
|
38
38
|
#
|
39
|
-
# Model.where(id: [1, 2, 3]).to_a.count { |m| m.method == true }
|
39
|
+
# `Model.where(id: [1, 2, 3]).to_a.count { |m| m.method == true }`
|
40
40
|
class Count < Cop
|
41
41
|
include RangeHelp
|
42
42
|
|
@@ -65,7 +65,8 @@ module RuboCop
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def non_redundant_merge?(node, receiver, pairs)
|
68
|
-
|
68
|
+
pairs.empty? ||
|
69
|
+
non_redundant_pairs?(receiver, pairs) ||
|
69
70
|
kwsplat_used?(pairs) ||
|
70
71
|
non_redundant_value_used?(receiver, node)
|
71
72
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-performance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-12-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
110
|
+
rubygems_version: 3.1.2
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Automatic performance checking tool for Ruby code.
|