Sha256: 4b13dc62c4c747349c572d8156cf3435f7c2080ef2a91f45cce5f3333baa65e4
Contents?: true
Size: 407 Bytes
Versions: 16
Compression:
Stored size: 407 Bytes
Contents
require 'facets/hash/alias.rb' require 'test/unit' class TestHashRekey < Test::Unit::TestCase def test_alias! foo = { 'a'=>1, 'b'=>2 } assert_equal( { 'a'=>1, 'b'=>2, 'c'=>2 }, foo.alias!('c','b') ) foo = { 'a'=>1, 'b'=>2 } assert_equal( { :a=>1, 'a'=>1, 'b'=>2 }, foo.alias!(:a,'a') ) foo = { :a=>1, :b=>2 } assert_equal( { :a=>1, :b=>2 }, foo.alias!('bar','foo') ) end end
Version data entries
16 entries across 16 versions & 1 rubygems