Don't you think we're overthinking this all? I'd personally just declare array-spreading parameters as anonymous and non-optional (which is compatible with how arity works). Nesting declarations might introduce a lot of complexity not only on the implementation of this feature, but also on its use, especially for arrays. def foo(a, (b, c)) => [[:req, :a], [:req, nil]] Nameless parameters would be already possible due to "*", anyway. Just my two cents. -- Daniel Luz On Wed, Nov 12, 2008 at 07:16, Brian Candler <B.Candler / pobox.com> wrote: > On Wed, Nov 12, 2008 at 06:01:40PM +0900, Brian Candler wrote: >> However I'm not sure what should happen for methods defined from blocks, >> e.g. define_method(:foo) { |a,(b,c)| ... } > > Hmm. > > class Foo > define_method(:foo) { |a,(b,c)| p a,b,c } > end > > Foo.new.foo(1,[2,3]) > puts "Arity: #{Foo.new.method(:foo).arity}" > > So foo has an arity of 2. But if you pass anything other than a two-element > array for the second argument, you get an ArgumentError: wrong number of > arguments. > > This suggests to me that the arguments structure needs to be nestable; the > second argument is itself an argument list. > >