Sha256: dd81142d698850554401a102b302e3b05e0c966f167dcc82f175344a4340d957
Contents?: true
Size: 359 Bytes
Versions: 3
Compression:
Stored size: 359 Bytes
Contents
describe "Array#compact" do it "returns a copy of array with all nil elements removed" do a = [1, 2, 4] a.compact.should == [1, 2, 4] a = [1, nil, 2, 4] a.compact.should == [1, 2, 4] a = [1, 2, 4, nil] a.compact.should == [1, 2, 4] a = [nil, 1, 2, 4] a.compact.should == [1, 2, 4] end # it "does not return self" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
opal-0.2.2 | opals/opal/opal/spec/core/array/compact_spec.rb |
opal-0.2.0 | opals/opal/opal/spec/core/array/compact_spec.rb |
opal-0.1.0 | opals/opal/spec/core/array/compact_spec.rb |