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: 55bbd229a457fd01ff1b22b43e644f5399dd97160ae6e4b853ce83bd6ea32359
4
- data.tar.gz: 7106cb02fec6940d7d59672b84add493689910ea1046bdc69b93d7db6edbeeb3
3
+ metadata.gz: 330b6db292d0709ef76d23cae8b7e84b24413d315b356a10a8a8596859b366ce
4
+ data.tar.gz: 32e9f148b06d630da9233b4fab33ea142eb0aa1006cd7cc311aafadabfe3c8fa
5
5
  SHA512:
6
- metadata.gz: b2840baf60f0906f80aa7a310bee2ac0591eb8763ff938334498d47f52df17782efbdcea0c50479a587a3d5b04f00bb2510c7779577b92a4caa6221944b55d85
7
- data.tar.gz: e89228cca25aefdceb216c530e928732d062f47971587e50403a79e67220904ff2b9e3601fbb997f529f1bd5b5fda066e727a4e2428026a44723edb959a3f066
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
- non_redundant_pairs?(receiver, pairs) ||
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
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module Performance
5
5
  module Version
6
- STRING = '1.5.1'
6
+ STRING = '1.5.2'
7
7
  end
8
8
  end
9
9
  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.1
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-11-13 00:00:00.000000000 Z
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.0.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.