Yukihiro Matsumoto
1/16/2009 1:58:00 AM
Hi,
In message "Re: Proc params extension"
on Fri, 16 Jan 2009 09:27:04 +0900, Tj Holowaychuk <tj@vision-media.ca> writes:
|
|Basically what I need is:
|
|Proc.new { |a,b,c| }.params # => [:a, :b, :c]
1.9 has Proc#parameters:
Proc.new { |a,b,c| }.parameters
# => [[:opt, :a, nil], [:opt, :b, nil], [:opt, :c, nil]]
which means all a, b, c are optional, and their default values are
nil.
matz.