Sha256: 33bc6f1365ec139266b259e32f016bb299597f0c5d8ce77544aaf73109bbeb7c
Contents?: true
Size: 338 Bytes
Versions: 5
Compression:
Stored size: 338 Bytes
Contents
covers 'facets/enumerable/map_with_index' test_case Enumerable do method :map_with_index do test do a = [1,2,3].map_with_index{ |e,i| e*i } a.assert == [0,2,6] end end method :collect_with_index do test do a = [1,2,3].collect_with_index{ |e,i| e*i } a.assert == [0,2,6] end end end
Version data entries
5 entries across 5 versions & 2 rubygems