solargraph 0.39.1 → 0.39.2

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: b287c1f54a79a771b343e16110cc0640a948abd0a6a5d7f187cd43e7bbea8b45
4
- data.tar.gz: 9b425158e5ee4f420c0ea84397d7d171f1893f2e49aed6ebbb3c7f920618679d
3
+ metadata.gz: b985b34fe6875e7ed506ce66d11f3a43d876008e69b3d76a9095deaee29da027
4
+ data.tar.gz: b851f7d46f241e19beeba03e2612591633725b18c37191e85309dad252cf8698
5
5
  SHA512:
6
- metadata.gz: b7c6214462ba598bfd184367c39d05264f82a5b0f94503ffe55ab321b8a8e7c8ef9da470780a7608b47c2360b8dc647d05a0546ff4ecddc6005ff2b015371629
7
- data.tar.gz: 6810ce41c48475b6875b1337f56f3cd4553abba55e51a0c42158678a6545a4255e0c2ae96b51961fe4c23bee95afb3c8a78322db93a36ac85506a433ee73aaf8
6
+ metadata.gz: de8f14a59263f1438d8e66988d6f85583a9b89e026903a8a5151bd58ce78a2d23aa729b697eec32ee82e7d7635731938d6bd7206c4186224250eb1bd084741b9
7
+ data.tar.gz: a74dfbeb17fd6dc505dfa045fc5b840f9ac0605c16ff7968e2911a29a72cddd4475bd3db3d05cf548048b702920f9adf722977caad6b99d7d1541dc3b38f24a7
@@ -126,9 +126,16 @@ module Solargraph
126
126
  result.push node
127
127
  node.children[0].children[2..-1].each { |child| result.concat call_nodes_from(child) }
128
128
  node.children[1..-1].each { |child| result.concat call_nodes_from(child) }
129
- elsif [:send, :super, :zsuper].include?(node.type)
129
+ elsif node.type == :send
130
130
  result.push node
131
131
  node.children[2..-1].each { |child| result.concat call_nodes_from(child) }
132
+ elsif [:super, :zsuper].include?(node.type)
133
+ result.push node
134
+ node.children.each { |child| result.concat call_nodes_from(child) }
135
+ elsif node.type == :masgn
136
+ # @todo We're treating a mass assignment as a call node, but the
137
+ # type checker still needs the logic to handle it.
138
+ result.push node
132
139
  else
133
140
  node.children.each { |child| result.concat call_nodes_from(child) }
134
141
  end
@@ -153,6 +153,7 @@ module Solargraph
153
153
  location: ref.location,
154
154
  closure: ref.closure,
155
155
  name: ref.name,
156
+ parameters: ref.parameters,
156
157
  comments: ref.comments,
157
158
  scope: :class,
158
159
  visibility: :public,
@@ -162,6 +163,7 @@ module Solargraph
162
163
  location: ref.location,
163
164
  closure: ref.closure,
164
165
  name: ref.name,
166
+ parameters: ref.parameters,
165
167
  comments: ref.comments,
166
168
  scope: :instance,
167
169
  visibility: :private,
@@ -76,6 +76,10 @@ module Solargraph
76
76
  if node.type == :ITER
77
77
  result.push node.children[0]
78
78
  node.children[1..-1].each { |child| result.concat call_nodes_from(child) }
79
+ elsif node.type == :MASGN
80
+ # @todo We're treating a mass assignment as a call node, but the
81
+ # type checker still needs the logic to handle it.
82
+ result.push node
79
83
  elsif [:CALL, :VCALL, :FCALL, :ATTRASGN, :OPCALL].include?(node.type)
80
84
  result.push node
81
85
  node.children.each { |child| result.concat call_nodes_from(child) }
@@ -248,10 +248,10 @@ module Solargraph
248
248
  if pins.first.is_a?(Pin::BaseMethod)
249
249
  # @type [Pin::BaseMethod]
250
250
  pin = pins.first
251
- if base.links.last.is_a?(Solargraph::Source::Chain::ZSuper)
252
- ap = arity_problems_for(pin, fake_args_for(block_pin), location)
251
+ ap = if base.links.last.is_a?(Solargraph::Source::Chain::ZSuper)
252
+ arity_problems_for(pin, fake_args_for(block_pin), location)
253
253
  else
254
- ap = arity_problems_for(pin, base.links.last.arguments, location)
254
+ arity_problems_for(pin, base.links.last.arguments, location)
255
255
  end
256
256
  unless ap.empty?
257
257
  result.concat ap
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Solargraph
4
- VERSION = '0.39.1'
4
+ VERSION = '0.39.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solargraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.39.1
4
+ version: 0.39.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder