Sha256: 2ab6241b6d163e4ddc5af9737a6aeee3e8bc217ac5072095434b470cf36fb195
Contents?: true
Size: 318 Bytes
Versions: 14
Compression:
Stored size: 318 Bytes
Contents
def foo if rand < 0.5 unknown else [:a, [:b, :c]] end end a, *bc = foo p(a) __END__ # Errors smoke/expandarray2.rb:3: [error] undefined method: Object#unknown # Revealed types # smoke/expandarray2.rb:11 #=> :a | untyped # Classes class Object private def foo: -> ([:a, [:b, :c]] | untyped) end
Version data entries
14 entries across 14 versions & 1 rubygems