Sha256: 9088b60d8f22f93504dab78dc1285826650a06102e46dc9199c311c1c2d8dfbc
Contents?: true
Size: 352 Bytes
Versions: 12
Compression:
Stored size: 352 Bytes
Contents
require 'facets/hash/slice' require 'test/unit' class TC_Hash_Slice < Test::Unit::TestCase def test_slice h = {:a=>1,:b=>2,:c=>3} e = {:b=>2, :a=>1} assert_equal(e, h.slice(:a, :b)) end def test_slice! h = {:a=>1,:b=>2,:c=>3} e = {:c=>3} assert_equal(e, h.slice!(:a, :b)) assert_equal({:a=>1,:b=>2}, h) end end
Version data entries
12 entries across 12 versions & 1 rubygems