
Issue #20657 has been updated by bkuhlmann (Brooke Kuhlmann). [Method Parameters And Arguments](https://alchemists.io/articles/ruby_method_parameters_and_arguments) are already complex (_powerful_ but complex). Historically, the block parameter has always been at the last position and optional by default. This would introduce new method signature complexity if a block was allowed to appear before positional and/or keyword arguments. What you might want instead, is a refinement to `Symbol#call` as provided by my [Refinements](https://alchemists.io/projects/refinements#_call) gem. Example: ``` ruby using Refinements::Symbol a.map(&:ljust.call(10)) # [ # "a1 ", # "b1 ", # "c1 " # ] ``` This would allow you to achieve what you asking for -- with tad more syntax than what you describe -- without making a drastic change to the language. Anyway, food for thought. ---------------------------------------- Feature #20657: Allow Enumerable#map(&:method) and #each accept additional parameters for method https://bugs.ruby-lang.org/issues/20657#change-109279 * Author: ukolovda (Dmitry Ukolov) * Status: Open ---------------------------------------- I can use `#map` (or `#each`) with short method name, for example: ``` ruby a = ["a1", "b1", "c1"] b = a.map(&:length) # or a.each(&:some_method) ``` But with additional arguments I must use yield: ```ruby c = a.map { |item| item.ljust(10) } # or a.each { |item| item.some_method(arg1, arg2) } ``` Direct sending allow make the code more simple: ```ruby c = a.map(&:ljust, 10) # Now give syntax error, unexpected ',', expecting ')' # or a.each(&:some_method, arg1, arg2) # Now give syntax error, unexpected ',', expecting ')' ``` -- https://bugs.ruby-lang.org/