In Ruby, we commonly use uniq method on an array to fetch the collection of all unique elements. But there may be cases where we might need elements in a hash by virtue of uniqueness of its values. Let's consider an example of countries that have hosted the Olympics. We only want to know when was the first time a country hosted it. 1 2# given object 3{ 1896 => 'Athens', 4 1900 => 'Paris', 5 1904 =
![Ruby 2.4 adds Enumerable#uniq & Enumerable::Lazy#uniq](https://cdn-ak-scissors.b.st-hatena.com/image/square/df7dcf3e382d2d4b018ba79fc6642260e3fa7070/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fdpc4i4bdx%2Fimage%2Fupload%2Fbigbinary_blogs%2Fdefault_blog_image.png)