4 ms·
Weird Ruby: The Double Aliased Enumerable Method
- Alifatisk 3y agoI agree, I have not really understood the purpose of having multiple aliases for the same thing. It just bloats the language for me. Also, the following can be written even shorter: [1,2,3,4,5].select { |num| num.even? } Like this: [1,2,3,4,5].select(:even?)