Sha256: 81ebd5a0b6caaa6c03f5da9175385b898ae4e6fe24604db9636aa822abbe3c6c

Contents?: true

Size: 298 Bytes

Versions: 3

Compression:

Stored size: 298 Bytes

Contents

class Foo
  def []=(*args)
    ary = []
    val = args[-1]
    ary[*args[0..-2]] = val # TODO: there is room to improve array_aset
    ary                     # This should be Array[String]
  end
end

Foo.new[1] = "str"

__END__
# Classes
class Foo
  def []=: (*Integer | String) -> Array[bot]
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
typeprof-0.9.2 smoke/array15.rb
typeprof-0.9.1 smoke/array15.rb
typeprof-0.9.0 smoke/array15.rb