{"width":"100%","provider_url":"https://hatena.blog","image_url":null,"blog_url":"https://rubytips86.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubytips86.hatenablog.com%2Fentry%2F2014%2F03%2F22%2F091734\" title=\"Array#uniq\u3067\u914d\u5217\u304b\u3089\u91cd\u8907\u3059\u308b\u8981\u7d20\u3092\u53d6\u308a\u9664\u304f - Ruby Tips!\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://rubytips86.hatenablog.com/entry/2014/03/22/091734","version":"1.0","published":"2014-03-22 09:17:34","provider_name":"Hatena Blog","description":"Array#uniq\u306f\u914d\u5217\u304b\u3089\u91cd\u8907\u3057\u305f\u8981\u7d20\u3092\u53d6\u308a\u9664\u3044\u305f\u65b0\u3057\u3044\u914d\u5217\u3092\u8fd4\u3059\u3002 \u65b0\u3057\u3044\u914d\u5217\u3092\u8fd4\u3059\u306e\u3067\u306f\u306a\u304f\u3001\u7834\u58ca\u7684\u306b\u914d\u5217\u304b\u3089\u91cd\u8907\u3057\u305f\u8981\u7d20\u3092\u53d6\u308a\u9664\u304fArray#uniq!\u3082\u3042\u308b\u3002 p [5, 1, 2, 4, 3, 1, 2, 5, 3, 5].uniq #=> [5, 1, 2, 4, 3] a = [4, 3, 4, 5, 3, 2, 5, 4, 1, 5] a.uniq! p a #=> [4, 3, 5, 2, 1]","height":"190","blog_title":"Ruby Tips!","categories":[],"title":"Array#uniq\u3067\u914d\u5217\u304b\u3089\u91cd\u8907\u3059\u308b\u8981\u7d20\u3092\u53d6\u308a\u9664\u304f","type":"rich","author_url":"https://blog.hatena.ne.jp/rubytips86/","author_name":"rubytips86"}