News for hackers. Stuff that matters.
Re:Rewriting the Ruby Parser by ljm on Tuesday June 13, 2023 @04:56PM (#36317155)
This would be more elegant if there was a better way to do `&object.method(:method_name, …)`. Unbound method support has been around for a long time but converting a method call with arguments to a prod is still not simple to do… unless you start currying methods and writing obscure code.
Re:Rewriting the Ruby Parser by zverok on Friday June 16, 2023 @05:51AM (#36353984)
Yes, that's what I referred to. Before 2.7, object&.:method was almost merged (or rather merged and reverted) because Matz had second thoughts about its uglyness... Which is not completely untrue, but not having a concise way for referring to a method is irritating.

That still wouldn't have solved passing additional args, so maybe { object.method_name(_1, args)} is the next best thing. Though it perceives non-atomic due to wrapping block.