Sha256: 810c2eadf6bf1e7327fa25ffbf68f79b34c44be84b760e3b9477197c436c5249
Contents?: true
Size: 361 Bytes
Versions: 5
Compression:
Stored size: 361 Bytes
Contents
covers 'facets/hash/autonew' test_case Hash do class_method :autonew do test do h = Hash.autonew h['s1']['p1'] = 4 h['s1']['p2'] = 5 h['s1']['p3'] = 2 h['s1']['p4'] = 3 h.assert == {"s1"=>{"p1"=>4, "p4"=>3, "p3"=>2, "p2"=>5}} h['s1'].keys.sort.assert == ["p1", "p2", "p3", "p4"] end end end
Version data entries
5 entries across 5 versions & 2 rubygems