jcinnamond/lawyer — pull request #3 by mus0u (2014-11-17 23:00:39+00:00)
Title: modify tests to demonstrate (existent) support for splat args (arity -1)

I asked a question during your talk about support for splat args. It turns out they're already supported, as Ruby returns -1 for the arity of splatted methods, with an additional -1 for each required argument before the splat, for example:

```ruby
def foo *args
end
method(:foo).arity # => -1

def foo2 arg1, *rest
end
method(:foo2).arity # => -2
```
and so on. So using the existing arity checking syntax will work for this just fine. But now you have a demo for it :)