solargraph 0.32.2 → 0.32.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/solargraph/api_map.rb +1 -1
- data/lib/solargraph/source/chain/call.rb +9 -2
- 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: d76bcc0ee329b23c7c59aabc9a502d8960c40e9b16ab4dc1983f2c6dc76b6344
|
4
|
+
data.tar.gz: 6b264048a68bf50e96e56bc527340df96b638bbe7ca43d4d9d561af84dbdcb3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 617c3091175a9a37737f5e2d8381cedfcdf8bb07c07aeeb00bbdf7b9d4076b29029e1b0c78555d6cb38fceda225245bbc02be1e51adc784bed9e2df1fec5161b
|
7
|
+
data.tar.gz: d431aa76ca0d2e2927defe3b11f0f26f8b388758fd930615602eb41c549bc6a0ad2c1c1135fc6bf56dcd81a9e989374ebde2b49d65789880779349702b257d04
|
data/lib/solargraph/api_map.rb
CHANGED
@@ -608,7 +608,7 @@ module Solargraph
|
|
608
608
|
# @return [Symbol] :class, :module, or nil
|
609
609
|
def get_namespace_type fqns
|
610
610
|
return nil if fqns.nil?
|
611
|
-
pin = store.get_path_pins(fqns).first
|
611
|
+
pin = store.get_path_pins(fqns).select{|p| p.is_a?(Pin::Namespace)}.first
|
612
612
|
return nil if pin.nil?
|
613
613
|
pin.type
|
614
614
|
end
|
@@ -32,7 +32,14 @@ module Solargraph
|
|
32
32
|
# @param context [Solargraph::ComplexType]
|
33
33
|
# @return [Pin::Method]
|
34
34
|
def virtual_new_pin new_pin, context
|
35
|
-
|
35
|
+
case new_pin.path
|
36
|
+
when 'Class.new'
|
37
|
+
Pin::ProxyType.anonymous(ComplexType.try_parse('Class<Object>'))
|
38
|
+
when 'Class#new'
|
39
|
+
Pin::ProxyType.anonymous(ComplexType.try_parse(context.namespace == 'Class' ? 'Object' : context.namespace))
|
40
|
+
else
|
41
|
+
Pin::ProxyType.anonymous(ComplexType.try_parse(context.namespace))
|
42
|
+
end
|
36
43
|
end
|
37
44
|
|
38
45
|
def inferred_pins pins, api_map, context, locals
|
@@ -61,7 +68,7 @@ module Solargraph
|
|
61
68
|
end
|
62
69
|
|
63
70
|
def external_constructor? pin, context
|
64
|
-
pin.path == 'Class#new' || (pin.name == 'new' && pin.scope == :class && pin.
|
71
|
+
pin.path == 'Class#new' || (pin.name == 'new' && pin.scope == :class && pin.docstring.tag(:return).nil?)
|
65
72
|
end
|
66
73
|
|
67
74
|
# @param pin [Pin::Method]
|
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.32.
|
4
|
+
version: 0.32.3
|
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-05-
|
11
|
+
date: 2019-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backport
|