typeprof 0.15.1 → 0.15.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: 52c9e6c0c338fb19da0264929bce36b903cdedf7be3b6a031deef525e28be8d4
4
- data.tar.gz: 8c17fe8549a7c44c8a11a1db9a40384b05f4025e5ec23140fee09eaf349d855c
3
+ metadata.gz: c31fc03c67fa15924e901b70890318e2391fa58cfaf897e51ff6a00d673d792a
4
+ data.tar.gz: c6ce703ec1c5f8a41d04603162746adb8a9416ccf29abc8ef1441cf83a3b41e3
5
5
  SHA512:
6
- metadata.gz: 74d8eddbd6010287d33c9891a59112f7f9edf1aa2f3ea24d07142e1d81e1c03508b1362a3630f092138352616a8258e973784d926293882894ba933123851f88
7
- data.tar.gz: 77bc3c7f268b11663f561829c4b1a2c4917e137c0e56c3b4e734f29862c011e7095b2d1939a352534f78003159d90f07f8de81ce1304819f4f79e5d5ac6f7242
6
+ metadata.gz: 790815f2528442ae742df0c3576a97ff6d2c856db374f2c8a63bb965dd6c715b6fa686d84b1fd56683e938e9c8e4014e9e86b53bb34ca4e9975b93bb5e5188df
7
+ data.tar.gz: ecc1433a74aebbe31c267c4697d71389a841cd66d74b251d1cc2d22bbeca228f141a8861ecbeebee3b16d54a8397f41eeab4f1f25ebac42103aee5e1146c9fe6
@@ -69,14 +69,17 @@ module TypeProf
69
69
  end
70
70
 
71
71
  def show_gvars(scratch, gvars, output)
72
+ gvars = gvars.dump.filter_map do |gvar_name, entry|
73
+ if entry.type != Type.bot && !entry.rbs_declared
74
+ [gvar_name, entry]
75
+ end
76
+ end
72
77
  # A signature for global variables is not supported in RBS
73
- return if gvars.dump.empty?
78
+ return if gvars.empty?
74
79
 
75
80
  output.puts "# Global variables"
76
- gvars.dump.each do |gvar_name, entry|
77
- next if entry.type == Type.bot
78
- s = entry.rbs_declared ? "#" : ""
79
- output.puts s + "#{ gvar_name }: #{ entry.type.screen_name(scratch) }"
81
+ gvars.each do |gvar_name, entry|
82
+ output.puts "#{ gvar_name }: #{ entry.type.screen_name(scratch) }"
80
83
  end
81
84
  output.puts
82
85
  end
@@ -1,3 +1,3 @@
1
1
  module TypeProf
2
- VERSION = "0.15.1"
2
+ VERSION = "0.15.2"
3
3
  end
data/smoke/gvar2.rb CHANGED
@@ -8,9 +8,6 @@ __END__
8
8
  # Errors
9
9
  smoke/gvar2.rb:1: [warning] inconsistent assignment to RBS-declared variable
10
10
 
11
- # Global variables
12
- #$foo: String
13
-
14
11
  # Classes
15
12
  class Object
16
13
  private
data/smoke/rbs-vars.rb CHANGED
@@ -21,9 +21,6 @@ class Foo
21
21
  end
22
22
 
23
23
  __END__
24
- # Global variables
25
- #$gvar: :gvar_example
26
-
27
24
  # Classes
28
25
  class Object
29
26
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typeprof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke Endoh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-15 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -419,7 +419,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
419
419
  - !ruby/object:Gem::Version
420
420
  version: '0'
421
421
  requirements: []
422
- rubygems_version: 3.2.15
422
+ rubygems_version: 3.3.0.dev
423
423
  signing_key:
424
424
  specification_version: 4
425
425
  summary: TypeProf is a type analysis tool for Ruby code based on abstract interpretation