strict_ivars 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a6e9c3b4af8b1558193b058b36ab883ecc8dbce111b13bafb0cedd54852faa9
4
- data.tar.gz: 22858692a9849c8f1f3b33450fe78054a622216221d81edd7992868a530dfc3c
3
+ metadata.gz: 8b40852e65a52e4b3dd5336b8cfc174ff60de3e7fd7d6549622b1738c828753d
4
+ data.tar.gz: 63e200edf34b4eb3848b40cd0e4f921572de924d1309ac93a59398a484ab8678
5
5
  SHA512:
6
- metadata.gz: b52c5c582936f6905a00b381846109d673b6ff8b9a6c7f568d4c8bab82b60c8158afbf3924628d93ee133e5d98583169462ac42887a8f50e0c96068c23a450ea
7
- data.tar.gz: 0b0d00db3c3daf0dd7c72ad2c3702e57240dcd93a5965d7b0e18b97ba56f5ec53dffc42cf4a7d845adc03ff0cd09c8f9c777d25d2c711be1c26de357583de977
6
+ metadata.gz: 1248ce12ade07900a700fed083f5a62063f8e986932937d0ae9be17c09bc3678d5f9d3b27e58933e5b74a8f0585bd1bf05477848ea8ee185376c9c791207928f
7
+ data.tar.gz: 82c46c5c5ca35a9de828063d026ce13c0b66053a4132c6d20c7c4a641d00c1206fe43d14a247295594c6f2443e0edb4bd4129a31fb8c5d122cc0d182b752902b
@@ -23,7 +23,7 @@ class StrictIvars::BaseProcessor < Prism::Visitor
23
23
  @annotations = []
24
24
  end
25
25
 
26
- #: Array[[Integer, :start_ivar_read | :end_ivar_read, Symbol]]
26
+ #: Array[[Integer, String]]
27
27
  attr_reader :annotations
28
28
 
29
29
  def visit_call_node(node)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StrictIvars
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
data/lib/strict_ivars.rb CHANGED
@@ -31,8 +31,8 @@ module StrictIvars
31
31
  # ```
32
32
  #: (include: Array[String], exclude: Array[String]) -> void
33
33
  def self.init(include: EMPTY_ARRAY, exclude: EMPTY_ARRAY)
34
- CONFIG.include(*include) unless include.length == 0
35
- CONFIG.exclude(*exclude) unless exclude.length == 0
34
+ CONFIG.include(*include)
35
+ CONFIG.exclude(*exclude)
36
36
 
37
37
  RequireHooks.source_transform(
38
38
  patterns: EVERYTHING,
@@ -74,7 +74,7 @@ module StrictIvars
74
74
  end
75
75
 
76
76
  if String === source
77
- file ||= caller_locations(1, 1).first&.path
77
+ file ||= caller_locations(1, 1).first.path
78
78
 
79
79
  if CONFIG.match?(file)
80
80
  args[0] = Processor.call(source)
@@ -83,6 +83,8 @@ module StrictIvars
83
83
  end
84
84
  end
85
85
 
86
+ args
87
+ rescue ::NameError
86
88
  args
87
89
  end
88
90
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strict_ivars
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Drapper