typeprof 0.21.8 → 0.21.9

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: 71c74382cb8602ed9c902218ec5066d20865cc8040e5af6737e8d8a0d19beca9
4
- data.tar.gz: 2646a63cd334443a8dc716f99a5828fac960afdf80f8a0f8c8b5f289e6fb957d
3
+ metadata.gz: 4f679437d629955ec31b3467826bd4114be2b02786bd31b15736681e52d8d01a
4
+ data.tar.gz: 8bd7c6403e4c7254e2de29a6d7515bd134996967266a138e2b11ca0834d604c3
5
5
  SHA512:
6
- metadata.gz: 9c0ca22252a4804152efafafb63c9c8d1d1fb2e796a9d17251f1634dc1393c7fcaac7f924d4a341a0699c5113c3fea8bb03714ceb287ded60bc7057cac7a640c
7
- data.tar.gz: 899c481fc8a4a05787ab0e66064220b33b17f8f1f0f045b9a1d05d4ebdae1ea4cd62cfe552342588b5a2834491638303be5a2e05c4b00d99713fe4693a6c557a
6
+ metadata.gz: 2ea5197a66f4672a7804b6994d9613b09c55c000024aa78231a29cf6f531e398e507dc50b3fa0ac51f99ca1c64a6b259eee853421209fcc1034748d06f64c6b0
7
+ data.tar.gz: a334eafef1cb1a808066f2e11862d6af634d38f5360b100699e30d19551213fd8d2b5763f4fd31c3a32273441e1753f15fbb956b7f00856745f678f024f93f70
@@ -24,7 +24,7 @@ jobs:
24
24
  ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
25
25
  runs-on: ubuntu-latest
26
26
  steps:
27
- - uses: actions/checkout@v3
27
+ - uses: actions/checkout@v4
28
28
  - name: Set up Ruby
29
29
  uses: ruby/setup-ruby@v1
30
30
  with:
data/lib/typeprof/type.rb CHANGED
@@ -734,14 +734,19 @@ module TypeProf
734
734
 
735
735
  def []=(k_ty, v_ty)
736
736
  k_ty.each_child_global do |k_ty|
737
- # This is a temporal hack to mitigate type explosion
738
- k_ty = Type.any if k_ty.is_a?(Type::Array)
739
- k_ty = Type.any if k_ty.is_a?(Type::Hash)
740
-
741
- if @map_tys[k_ty]
742
- @map_tys[k_ty] = @map_tys[k_ty].union(v_ty)
737
+ if k_ty.is_a?(Type::Union)
738
+ # Flatten recursive union
739
+ self[k_ty] = v_ty
743
740
  else
744
- @map_tys[k_ty] = v_ty
741
+ # This is a temporal hack to mitigate type explosion
742
+ k_ty = Type.any if k_ty.is_a?(Type::Array)
743
+ k_ty = Type.any if k_ty.is_a?(Type::Hash)
744
+
745
+ if @map_tys[k_ty]
746
+ @map_tys[k_ty] = @map_tys[k_ty].union(v_ty)
747
+ else
748
+ @map_tys[k_ty] = v_ty
749
+ end
745
750
  end
746
751
  end
747
752
  end
@@ -1,3 +1,3 @@
1
1
  module TypeProf
2
- VERSION = "0.21.8"
2
+ VERSION = "0.21.9"
3
3
  end
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.21.8
4
+ version: 0.21.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke Endoh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  requirements: []
92
- rubygems_version: 3.5.0.dev
92
+ rubygems_version: 3.5.1
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: TypeProf is a type analysis tool for Ruby code based on abstract interpretation