module T::Utils

def self.arity(method)

Returns the arity of a method, unwrapping the sig if needed
def self.arity(method)
  arity = method.arity
  return arity if arity != -1 || method.is_a?(Proc)
  sig = T::Private::Methods.signature_for_method(method)
  sig ? sig.method.arity : arity
end