From: Brian Candler Date: 2008-11-14T17:33:44+09:00 Subject: [ruby-core:19932] Re: {Proc,Method}#parameters (Re: Proposal: Method#get_args) On Fri, Nov 14, 2008 at 03:09:52PM +0900, Nobuyoshi Nakada wrote: > Hi, > > At Thu, 13 Nov 2008 18:44:53 +0900, > Brian Candler wrote in [ruby-core:19915]: > > That does give me an idea. Since "?" is not legal in a variable name, then a > > very simple option could be > > > > def foo(a, b, c=123, d=nil, *e, &blk) > > > > => ["a", "b", "?c", "?d", "*e", "&blk"] > > It's simplest. > > > define_method(:bar) { |a,(b,c)| } > > > > => ["a", ["b", "c"]] > > Is it really necessary? Probably not. Maybe ["a", "()"], otherwise ["a", nil] as you propose.