Sha256: edf1851ca4c1291d2e8735766681deda75eaaf2cca1bbedfea95a7347aef20ce
Contents?: true
Size: 215 Bytes
Versions: 6
Compression:
Stored size: 215 Bytes
Contents
class SparseArray def length if keys.any? keys.max + 1 else 0 end end def serialize if keys.any? (0..(length-1)).map {|i| fetch i, 0 } else [] end end end
Version data entries
6 entries across 6 versions & 1 rubygems