ã¯ã£ã¨ãããã¨
ruby-1.9.2-p0 > 10.times.map{ 'foo' }.map{|v| puts v.object_id } 2152510320 2152510280 2152510200 2152510160 2152510120 2152510060 2152510020 2152509980 2152509920 2152509780 => [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil] ruby-1.9.2-p0 > (['foo']*10).map{|v| puts v.object_id } 2151828140 2151828140 2151828140 2151828140 2151828140 2151828140 2151828140 2151828140 2151828140 2151828140 => [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil]
ãã¾ãæèãã¦ãªãã£ãã
http://doc.ruby-lang.org/ja/1.9.2/class/Array.html
æ°å¤ã¨ãSymbolã¯ã©ã¡ããåãã§object_idã¯å¤ãããªããå°ãåã«RHGãããã£ã¨ã ãèªãã ã®ã§ããã¯æ³åã§ããã
ruby-1.9.2-p0 > 10.times.map{ :urryyyy }.map{|v| puts v.object_id } 498728 498728 498728 498728 498728 498728 498728 498728 498728 498728 => [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil]
äºæ³ãããã£ã¦ããã£ãã