From: Yehuda Katz Date: 2011-12-04T15:39:40+09:00 Subject: [ruby-core:41472] Re: [ruby-trunk - Bug #5694] Proc#arity doesn't take optional arguments into account. --0016364eef1a53176f04b33e770d Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I like it! On Sat, Dec 3, 2011 at 7:41 PM, NARUSE, Yui wrote: > (2011/12/03 4:20), Yehuda Katz wrote: > > Yeah=85 it would be nice to be able to do: > > > > if proc.arity_range.include?(2) > > if method.arity_range.include?(2) > > Is it really required way? > > For example you want to know whether you can obj.meth(a, b) or not, > it should be something like obj.callable?(:meth, a, b), shouldn't it? > > -- > NARUSE, Yui > > --0016364eef1a53176f04b33e770d Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I like it!

On Sat, Dec 3, 2011 at 7:41 P= M, NARUSE, Yui <n= aruse@airemix.jp> wrote:
(2011/12/03 4:20), Yehuda Katz wrote:
> Yeah=85 it would be nice to be able to do:
>
> =A0 if proc.arity_range.include?(2)
> =A0 if method.arity_range.include?(2)

Is it really required way?

For example you want to know whether you can obj.meth(a, b) or not,
it should be something like obj.callable?(:meth, a, b), shouldn't it?
--
NARUSE, Yui =A0<naruse@airemix.jp>


--0016364eef1a53176f04b33e770d--