From: svoop_he38hj327c@... Date: 2020-12-26T18:57:43+00:00 Subject: [ruby-core:101720] [Ruby master Feature#17475] Implement arguments forwarding for blocks Issue #17475 has been reported by svoop (Sven Schwyn). ---------------------------------------- Feature #17475: Implement arguments forwarding for blocks https://bugs.ruby-lang.org/issues/17475 * Author: svoop (Sven Schwyn) * Status: Open * Priority: Normal ---------------------------------------- In a gem, I create a bunch of initializer shortcuts as follows: # Shortcut initializers CLASSES.each do |element, class_name| define_singleton_method(element) do |*args, **kwargs| class_name.to_class.new(*args, **kwargs) end end Given the new, cool arguments forwarding with `...`, it would be a real beauty if the following were possible: # Shortcut initializers CLASSES.each do |element, class_name| define_singleton_method(element) do |...| class_name.to_class.new(...) end end (I'm sorry if this is a duplicate. In some dusty corner of my memory, I believe to have seen a similar issue in the past, but couldn't find it anymore... maybe just dreamt of it. :-) -- https://bugs.ruby-lang.org/ Unsubscribe: