From: Ryan Davis Date: 2007-10-11T18:04:55+09:00 Subject: Re: MatchData#select rdoc and arity incorrect --Apple-Mail-2--962101386 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Oct 11, 2007, at 00:57 , Eric Hodel wrote: >> But the example given doesn't run, and the arity of select is -1 >> instead of zero as would be indicated by the resulting error. > > History says it used to run, but now uses yield. The documentation > is out of date. You're both right: if (argc > 0) { rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc); } yet: rb_define_method(rb_cMatch, "select", match_select, -1); the doco should be fixed and the arity set to 0. --Apple-Mail-2--962101386 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
On Oct 11, 2007, = at 00:57 , Eric Hodel wrote:

But the = example given doesn't run, and the arity of select is -1 instead of zero = as would be indicated by the resulting error.


History says it used to run, but now uses yield.=A0 The documentation is out of = date.


You're both = right:

=A0=A0 = =A0if (argc > 0) {
rb_raise(rb_eArgError, "wrong = number of arguments (%d for 0)", argc);
=A0 =A0 = }

yet:

=A0=A0 = =A0rb_define_method(rb_cMatch, "select", match_select, = -1);

the doco = should be fixed and the arity set to 0.

= --Apple-Mail-2--962101386--