Sha256: 2966976a049ec86ffe977e470174df4fde06edd99021a688ce42d1eab024899f
Contents?: true
Size: 648 Bytes
Versions: 6
Compression:
Stored size: 648 Bytes
Contents
# This code is created by simplifying matrix.rb. # The issue occurs when `Array.new` creates a cell-type container, # so this test will be obsolete, but keep it just for case of regression. # # https://github.com/ruby/typeprof/issues/14 class Foo def initialize(ivar) @ivar = ivar end def foo(n) @ivar.each_with_index { } nil end end Foo.new([]) rows = Array.new(1) do |i| Array.new(1) do |j| "str" end end obj = Foo.new(rows) obj.foo(:a) obj.foo(:b) __END__ # Classes class Foo @ivar: Array[Array[String]] def initialize: (Array[Array[String]] ivar) -> Array[Array[String]] def foo: (:a | :b n) -> nil end
Version data entries
6 entries across 6 versions & 1 rubygems