fasterer 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/lib/fasterer/scanners/method_call_scanner.rb +2 -1
- data/lib/fasterer/version.rb +1 -1
- data/spec/support/analyzer/18_block_vs_symbol_to_proc.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 689e281614a7c4c1ec8eaafed6505b1205b71798872a12ec8bea4e00c65c60a0
|
4
|
+
data.tar.gz: 63b5180abe71cccbeb9bb42279f5c0f857250f047d0eb79aa79895144bf8a3a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 438773a5e69d25d37e3c9897c98bbf09b7bf49bba65fe421efd965b788899a0e912b7c6b326da93bfe52c7642ab4310fa7fa5379996a6df2daf72320b2296748
|
7
|
+
data.tar.gz: 67a2c9dd2bbf92ea62b0e5e5596d374361fa50972de2624ffe31c094e2595c4f82d17a7cc9ccf813ab27cf0a4f776ee0a69771abb2fad267588308715b48f6e0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.8.2
|
4
|
+
|
5
|
+
- Fixes [#77](https://github.com/DamirSvrtan/fasterer/issues/77). An error occurs on the symbol to proc check when somebody invokes a method with no arguments on an array or range inside of the inspected block. Seems like a bug in the inspected code, but nevertheless it is a code path we need to support.
|
6
|
+
|
3
7
|
## 0.8.1
|
4
8
|
|
5
9
|
- Ignore lambda literals when checking symbol to proc. Thanks to [kiyot](https://github.com/kiyot) for his fix in PR [#74](https://github.com/DamirSvrtan/fasterer/pull/74).
|
@@ -132,7 +132,8 @@ module Fasterer
|
|
132
132
|
return unless body_method_call.arguments.count.zero?
|
133
133
|
return if body_method_call.has_block?
|
134
134
|
return if body_method_call.receiver.nil?
|
135
|
-
return
|
135
|
+
return if body_method_call.receiver.is_a?(Fasterer::Primitive)
|
136
|
+
return if body_method_call.receiver.name != method_call.block_argument_names.first
|
136
137
|
|
137
138
|
add_offense(:block_vs_symbol_to_proc)
|
138
139
|
end
|
data/lib/fasterer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fasterer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damir Svrtan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|