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 +4 -4
- data/.github/workflows/main.yml +1 -1
- data/lib/typeprof/type.rb +12 -7
- data/lib/typeprof/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f679437d629955ec31b3467826bd4114be2b02786bd31b15736681e52d8d01a
|
4
|
+
data.tar.gz: 8bd7c6403e4c7254e2de29a6d7515bd134996967266a138e2b11ca0834d604c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ea5197a66f4672a7804b6994d9613b09c55c000024aa78231a29cf6f531e398e507dc50b3fa0ac51f99ca1c64a6b259eee853421209fcc1034748d06f64c6b0
|
7
|
+
data.tar.gz: a334eafef1cb1a808066f2e11862d6af634d38f5360b100699e30d19551213fd8d2b5763f4fd31c3a32273441e1753f15fbb956b7f00856745f678f024f93f70
|
data/.github/workflows/main.yml
CHANGED
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
|
-
|
738
|
-
|
739
|
-
|
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
|
-
|
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
|
data/lib/typeprof/version.rb
CHANGED
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.
|
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-
|
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.
|
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
|