Sha256: 8a4f1b163ba189b3a4b0d4d9dc07dc1a92e3f2832c267b0511f2e726f4d04a51
Contents?: true
Size: 333 Bytes
Versions: 23
Compression:
Stored size: 333 Bytes
Contents
describe "Array#clear" do it "removes all elements" do a = [1, 2, 3, 4] a.clear a.should == [] end it "returns self" do a = [1] old = a.object_id a.clear.object_id.should == old end it "leaves the Array empty" do a = [1] a.clear a.empty?.should == true a.size.should == 0 end end
Version data entries
23 entries across 23 versions & 1 rubygems