Re: I'm confused about Ruby.2.5.3 Method#arity for Dir.entries and Dir#entries

Danielle Velie <[email protected]> Wed, 23 Oct 2019 02:02:53 -0500
Newsgroups gmane.comp.lang.ruby.general
Message-ID <CA+3uGikHcxK9RaE5ttv441qmwHRCtMR9Py7Bp+WLSwYSY5StFg@mail.gmail.com>
Can you please explain to me what is going on sir with the program thank
you so much Danielle Lee Ramos

On Tue, Oct 22, 2019, 7:15 AM gga <[email protected]> wrote:

>
> El 7/10/19 a las 10:53, Colin Bartlett escribió:
> > Method#arity:
> > Returns an indication of the number of arguments accepted by a method.
> > Returns a nonnegative integer for methods that take a fixed number of
> arguments.
> > For Ruby methods that take a variable number of arguments,
> > returns -n-1, where n is the number of required arguments. ...
> >
> > In the following:
> > 1. Why isn't MRI Dir.method(:entries).arity == 1?
> > 2. Why isn't JRuby Dir.method(:entries).arity == -2?
> > 3. Why isn't MRI d.method(:entries).arity == 0? (Where d = Dir.new(".").)
> >
> > Thanks in advance for any help!
> Looks like a couple of bugs to me.
>
> Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>


Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>