lib/tapioca/gem/pipeline.rb in tapioca-0.10.3 vs lib/tapioca/gem/pipeline.rb in tapioca-0.10.4
- old
+ new
@@ -239,11 +239,10 @@
return if symbol_in_payload?(name)
klass = class_of(value)
klass_name = if klass == ObjectSpace::WeakMap
- # WeakMap is an implicit generic with one type variable
- "ObjectSpace::WeakMap[T.untyped]"
+ sorbet_supports?(:non_generic_weak_map) ? "ObjectSpace::WeakMap" : "ObjectSpace::WeakMap[T.untyped]"
elsif T::Generic === klass
generic_name_of(klass)
else
name_of(klass)
end