DEV Community

Discussion on: Reverted Ruby 2.7 new feature: Method reference operator

Collapse
 
igorkasyanchuk profile image
Igor Kasyanchuk • Edited
["NG"].any?(&"COPYING".:include?)

I really believe Ruby is moving in the wrong direction. This is not readable.

Collapse
 
hanachin profile image
Seiei Miyagi

That's my example's problem.

Many other real world use-cases are on the issues.
bugs.ruby-lang.org/issues/12125
bugs.ruby-lang.org/issues/13581

It's handy in block argument for Enumerable methods like map, or select.