low_type 0.8.3 → 0.8.5

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: 667a67d5804487b7c8f4e05e48d8d38bf1d5c268f948514f717b6dd8d3226e39
4
- data.tar.gz: 74f74a2e53a1f39cd26fd3063156538a4249590fb38951638f91db808395ac77
3
+ metadata.gz: 40a701625494d482b8d9aa6092f8f924cd84ebc3310186e4dc9c1af38ff67cd4
4
+ data.tar.gz: f24a27f11822f27177132eb8b840a9cdc4081867a171e338131a45e3b1a3b787
5
5
  SHA512:
6
- metadata.gz: 6153895702897f11aac6b4ba7334d434996749a0c192c618727f5018e77d191f9068805100bbea346cad20365a0efd730d1521dd48080408601914ae43f1434d
7
- data.tar.gz: 12fc3c99abbaf58b4b72b2dc75a3b3e5e70cdd3da4bee1b2520217292f471a0303db3ed1582f1bc8a3d2c16c2dac7c58bb76620c598986b94a52a95b1cfb1691
6
+ metadata.gz: 62f84ed471ba858386cba1a1eb8876d62612701bc5760b1e60dd78cb37e10f1741228a4ec7ccbdf0eefbbe94cb13ffca12180ea1d8feedcd7d2c42ed627c4289
7
+ data.tar.gz: 02c5577b08fc0ca6ab7e564efb550e11d80ff0521feeaff34aac291332f777507b04c40c9fea038976bacef187c5c769a6ea7a26060ba906cd0d95189b8c9c4c
@@ -27,7 +27,8 @@ module LowType
27
27
 
28
28
  pattern = arguments_node.arguments.first.content
29
29
 
30
- file = FileProxy.new(path: @file_path, line: method_call.start_line, scope: "#{@klass}##{method_call.name}")
30
+ line = method_call.respond_to?(:start_line) ? method_call.start_line : nil
31
+ file = FileProxy.new(path: @file_path, line:, scope: "#{@klass}##{method_call.name}")
31
32
  params = [ParamProxy.new(type_expression: nil, name: :route, type: :req, position: 0, file:)]
32
33
  return_proxy = return_proxy(method_node: method_call, pattern:, file:)
33
34
  next unless return_proxy
data/lib/redefiner.rb CHANGED
@@ -14,7 +14,8 @@ module LowType
14
14
  Module.new do
15
15
  method_nodes.each do |method_node|
16
16
  name = method_node.name
17
- file = FileProxy.new(path: file_path, line: method_node&.start_line, scope: "#{klass}##{method_node.name}")
17
+ line = method_node.respond_to?(:start_line) ? method_node.start_line : nil
18
+ file = FileProxy.new(path: file_path, line:, scope: "#{klass}##{method_node.name}")
18
19
  params = Redefiner.params_with_type_expressions(method_node:, file:)
19
20
  return_proxy = Redefiner.return_proxy(method_node:, file:)
20
21
 
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LowType
4
- VERSION = '0.8.3'
4
+ VERSION = '0.8.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: low_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - maedi