solargraph 0.35.0 → 0.35.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/solargraph/pin/base_variable.rb +4 -1
- data/lib/solargraph/source_map/clip.rb +8 -0
- data/lib/solargraph/version.rb +1 -1
- 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: e6e65af0d45e5656d2bc17c0670ef5e308e3fb6f64be8db0ec1891e2203a81d6
|
|
4
|
+
data.tar.gz: 47e21df5e48d43ed40281d37ae3c50ddf6aaf643dff49da07b849d917f3fcf16
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39b7b5fb39ce59ccf93c62775e3f685f0e71409aa791f76bf61a44202cb21d1501452961d267f07b40fb4dbbba8a82a2ebc349cea6857dc9e3b9796af9c8e510
|
|
7
|
+
data.tar.gz: 584f2110a4faf9cd98edd37bed4167b59f119b66168786d1faa0ad774d3180d66a0408e195d4a669f62cbd9252db75d0aa442fc6e4640f403eccd227b6320062
|
|
@@ -45,7 +45,10 @@ module Solargraph
|
|
|
45
45
|
returns_from(@assignment).each do |node|
|
|
46
46
|
pos = Solargraph::Position.new(node.loc.expression.last_line, node.loc.expression.last_column)
|
|
47
47
|
clip = api_map.clip_at(location.filename, pos)
|
|
48
|
-
|
|
48
|
+
# Use the return node for inference. The clip might infer from the
|
|
49
|
+
# first node in a method call instead of the entire call.
|
|
50
|
+
chain = Solargraph::Source::NodeChainer.chain(node, nil, clip.in_block?)
|
|
51
|
+
result = chain.infer(api_map, closure, clip.locals)
|
|
49
52
|
types.push result unless result.undefined?
|
|
50
53
|
end
|
|
51
54
|
return ComplexType::UNDEFINED if types.empty?
|
|
@@ -95,6 +95,14 @@ module Solargraph
|
|
|
95
95
|
block.gates
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
+
def in_block?
|
|
99
|
+
return @in_block unless @in_block.nil?
|
|
100
|
+
@in_block = begin
|
|
101
|
+
tree = cursor.source.tree_at(cursor.position.line, cursor.position.column)
|
|
102
|
+
tree[1].is_a?(Parser::AST::Node) && tree[1].type == :block
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
98
106
|
private
|
|
99
107
|
|
|
100
108
|
# @return [ApiMap]
|
data/lib/solargraph/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solargraph
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.35.
|
|
4
|
+
version: 0.35.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fred Snyder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-07-
|
|
11
|
+
date: 2019-07-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: backport
|