3 Matching Annotations
  1. Aug 2021
    1. You need to explicitly delegate keyword arguments. def foo(*args, **kwargs, &block) target(*args, **kwargs, &block) end
    2. you can use the new delegation syntax (...) that is introduced in Ruby 2.7. def foo(...) target(...) end
    3. In Ruby 2, you can write a delegation method by accepting a *rest argument and a &block argument, and passing the two to the target method. In this behavior, the keyword arguments are also implicitly handled by the automatic conversion between positional and keyword arguments.