Sha256: 09c645d64b79084b413712cc9ba34f3b00a4f9d179c8e09a7c8594fe237c0a9c
Contents?: true
Size: 261 Bytes
Versions: 49
Compression:
Stored size: 261 Bytes
Contents
describe "Enumerator#with_index" do it "returns the result of the previously called method" do [1, 2, 3].each.with_index { |item, index| item * 2 }.should == [1, 2, 3] [1, 2, 3].map.with_index { |item, index| item * 2 }.should == [2, 4, 6] end end
Version data entries
49 entries across 49 versions & 1 rubygems