[#3228] Core support for Gems, and namespace — "Luke A. Kanies" <luke@...>

Hi all,

21 messages 2004/07/27
[#3230] Re: Core support for Gems, and namespace — Austin Ziegler <halostatue@...> 2004/07/27

On Tue, 27 Jul 2004 11:39:08 +0900, Luke A. Kanies <luke@madstop.com> wrote:

[#3234] Re: Core support for Gems, and namespace — "Luke A. Kanies" <luke@...> 2004/07/27

On Tue, 27 Jul 2004, Austin Ziegler wrote:

[#3238] Re: Core support for Gems, and namespace — Austin Ziegler <halostatue@...> 2004/07/27

On Wed, 28 Jul 2004 00:14:29 +0900, Luke A. Kanies <luke@madstop.com> wrote:

[doc] Inconsistent "call-seq" usage etc.

From: Johan Holmberg <holmberg@...>
Date: 2004-07-09 17:29:48 UTC
List: ruby-core #3167
Looking through the existing RDOC documentation I found another
inconsistency. First some background:

The "call-seq" for methods in classes implemented in C are given
explicitly as part of the RDOC documentation entry for each method.

For library classes implemented in Ruby, RDOC picks up the calling
sequence automatically from the Ruby source.

Now to the "problem":

As it is now, these two kinds of methods generate different kinds of
documentation entries (RDOC --> HTML). An example from the Time
class (defined in "time.c" but extended in "lib/time.rb"):

-------------------------------------
    time.hour => fixnum

    Returns the hour of the day (0..23) for time.
    ...
-------------------------------------
    httpdate()

    Returns a string which represents the time as rfc1123-date of
    HTTP-date defined by RFC 2616:
    ...
-------------------------------------

Note how the first method description explicitly mentions the
receiver (called "time" there), and the second method lets the
receiver be implicit.

I think this inconsistency ought to be resolved.
I don't know which of the alternatives looks best, but right now it
looks kind of silly (especially when the mix occurs inside a single
class, but even between different classes).

The alternative chosen also affects how the description of a method
should be most naturally worded. Now some method descriptions call
their receiver something (e.g. "self") while the the "call-seq"
calls the receiver something different (e.g. "array" or "arr").

What do say ?

/Johan Holmberg


In This Thread

Prev Next