4 Matching Annotations
  1. Feb 2020
    1. Returns an indication of the number of arguments accepted by a method. Returns a nonnegative integer for methods that take a fixed number of arguments. For Ruby methods that take a variable number of arguments, returns -n-1, where n is the number of required arguments. Keyword arguments will be considered as a single additional argument, that argument being mandatory if any keyword argument is mandatory. For methods written in C, returns -1 if the call takes a variable number of arguments.

      What they fail to mention is that apparently the arity is always -1 if the method is available dynamically (due to respond_to_missing?).