Remove Enumerable#grep

After reading Can anyone explain range as array#select arguments to me, I learnt that there is Enumerable#grep.
Enumerable#grep(pattern) duplicates Enumerable#select(pattern).
I propose to deprecate grep, then remove it for the following reasons:

  • select is more widely used, grep is only present in this very method
  • select is a more descriptive English word about the action performed than grep
  • follows the least aliases principle
6 Likes

Related PR: https://github.com/crystal-lang/crystal/pull/8452