19 Matching Annotations
  1. Apr 2025
  2. Sep 2023
  3. Mar 2022
  4. Aug 2021
    1. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: # If a method accepts rest argument and no `**nil` def foo(*args) p args end # Passing keywords are converted to a Hash object (even in Ruby 3.0) foo(k: 1) #=> [{:k=>1}] # If the method is extended to accept a keyword def foo(*args, mode: false) p args end # The existing call may break foo(k: 1) #=> ArgumentError: unknown keyword k
  5. Apr 2021
  6. Feb 2021
  7. Nov 2020
  8. Oct 2020
  9. Sep 2020
  10. Jul 2020
  11. Jun 2020
  12. May 2020
  13. Apr 2020
  14. Nov 2019