re: Ruby 2.7 new feature: Method reference operator VIEW POST

VIEW FULL DISCUSSION
 
["NG"].any?(&"COPYING".:include?)

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

 

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.

code of conduct - report abuse