rubocop-performance 1.1.0 → 1.2.0

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: 4c816f114aca2b788180d1ee5869c0a56431f9d98ff5c4d02d664ca7f90fd3e6
4
- data.tar.gz: 6c7fc284ea2f60d098e53f0b9518b0ca1676e1b4659d0b30e230b044ad089316
3
+ metadata.gz: d571b90f427f5c2d7212fcf223a975d2426cc5b216832832d3d22c4196c6c7d3
4
+ data.tar.gz: '09978347ef923455817c3f9e1753011efd618f99e6f72deffdf0e221ece5c5ad'
5
5
  SHA512:
6
- metadata.gz: e2b576ba2e2d34fccfd31dbda2f34d85c9e359ed0c34195393fac93d6918070dbd64fb07d3e9a60f3f7074e09a969c5e78caaf15a231d614fc9e3d5100926c64
7
- data.tar.gz: 8c9a0db760475847abcd14a41a403c294e3bbbe75a8fa7070b0047ff043a2ea840beff2a550500727aae98ec2262ebaaa2fba57b160aa1aec0b9afc0f54212b1
6
+ metadata.gz: b5886c02136883367f4fadf6818369dd08c344ee2306704a3695cc28f3c19b4d45a434f56d9b3b229d9f01644b530e64057fe6a2ae2830157d181079dc880a7e
7
+ data.tar.gz: 7139532bfe4d15a47cee1eff3618529ae93faec8cedb693a40a454b866fb1f3e252fbb303e7f393ba70c9e9ab387e2814dd96e15d36b9d1dfcb693a5f08f5608
@@ -36,8 +36,8 @@ module RuboCop
36
36
  PATTERN
37
37
 
38
38
  def on_send(node)
39
- open_struct(node) do |method|
40
- add_offense(node, location: :selector, message: format(MSG, method))
39
+ open_struct(node) do
40
+ add_offense(node, location: :selector)
41
41
  end
42
42
  end
43
43
  end
@@ -86,8 +86,8 @@ module RuboCop
86
86
 
87
87
  def_node_matcher :match_method?, <<-PATTERN
88
88
  {
89
+ (send _recv :match _ <int ...>)
89
90
  (send _recv :match _)
90
- (send _recv :match _ (int ...))
91
91
  }
92
92
  PATTERN
93
93
 
@@ -86,7 +86,8 @@ module RuboCop
86
86
 
87
87
  unless first_param.str_type?
88
88
  return true if options
89
- return true unless first_source =~ DETERMINISTIC_REGEX
89
+ return true unless first_source.is_a?(String) &&
90
+ first_source =~ DETERMINISTIC_REGEX
90
91
 
91
92
  # This must be done after checking DETERMINISTIC_REGEX
92
93
  # Otherwise things like \s will trip us up
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module Performance
5
5
  module Version
6
- STRING = '1.1.0'.freeze
6
+ STRING = '1.2.0'.freeze
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.1.0
4
+ version: 1.2.0
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-04-08 00:00:00.000000000 Z
13
+ date: 2019-05-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 0.67.0
21
+ version: 0.68.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: 0.67.0
28
+ version: 0.68.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: simplecov
31
31
  requirement: !ruby/object:Gem::Requirement