More than you care to know about the uniq method
The other day I was digging through the ruby documentation and stumbled on the uniq method. I was startled to find that you can pass in a block as a parameter. My instinct was to back away slowly, not unlike a cat looking at a bathtub full of water. After all, why on Earth would one want to filter uniqueness based on some criteria other than an exact match? Undaunted, I figured it would be fun to explore this method a bit more… find out what makes it tick.