rubocop-ast 1.36.0 → 1.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubocop/ast/node/ensure_node.rb +0 -13
- data/lib/rubocop/ast/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb157bc53c77f0b4583fe4a1fae816b2293db5a15a959f4fce65da9cea0d887f
|
4
|
+
data.tar.gz: d3ebac2e11d25746a9b0a33815049848d7773049c69db74b4e667692e07f6189
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5810513b99608118aad971f53f3e88a535a3c6d281d3fe3a6a4615c3ec635697f377f610b30d230d2e529d39e84e0d48353bfaac44da2956c3c94716ec2740f
|
7
|
+
data.tar.gz: 65ee46a6d28b659b967662dc971986b545044209dc879cfb6e1fe556c414754dccd13b8db01be73dbc168a1474bf8bf34b20dea768a4b84b7eef7e41bfce19e9
|
@@ -6,24 +6,11 @@ module RuboCop
|
|
6
6
|
# node when the builder constructs the AST, making its methods available
|
7
7
|
# to all `ensure` nodes within RuboCop.
|
8
8
|
class EnsureNode < Node
|
9
|
-
DEPRECATION_WARNING_LOCATION_CACHE = [] # rubocop:disable Style/MutableConstant
|
10
|
-
private_constant :DEPRECATION_WARNING_LOCATION_CACHE
|
11
|
-
|
12
9
|
# Returns the body of the `ensure` clause.
|
13
10
|
#
|
14
11
|
# @return [Node, nil] The body of the `ensure`.
|
15
12
|
# @deprecated Use `EnsureNode#branch`
|
16
13
|
def body
|
17
|
-
first_caller = caller(1..1).first
|
18
|
-
|
19
|
-
unless DEPRECATION_WARNING_LOCATION_CACHE.include?(first_caller)
|
20
|
-
warn '`EnsureNode#body` is deprecated and will be changed in the next major version of ' \
|
21
|
-
'rubocop-ast. Use `EnsureNode#branch` instead to get the body of the `ensure` branch.'
|
22
|
-
warn "Called from:\n#{caller.join("\n")}\n\n"
|
23
|
-
|
24
|
-
DEPRECATION_WARNING_LOCATION_CACHE << first_caller
|
25
|
-
end
|
26
|
-
|
27
14
|
branch
|
28
15
|
end
|
29
16
|
|
data/lib/rubocop/ast/version.rb
CHANGED