[#2320] Problems in mathn, rational, complex, matrix — Gavin Sinclair <gsinclair@...>
I received a message from Richard Graham mentioning a problem in the
[#2346] Patch for socket.c: control reverse lookup for every instance — Thomas Uehlinger <uehli@...>
Hi all
[#2357] Use the BasicSocket#do_not_reverse_lookup flag in Webrick — Thomas Uehlinger <uehli@...>
Hi
[#2367] Standard libraries — Dave Thomas <dave@...>
From ruby-dev summary:
Hi,
Hi,
By the way, this issue is about a matter of taste, so the debate is somewhat
Hi,
On Thu, Feb 12, 2004 at 02:58:22PM +0900, NAKAMURA, Hiroshi wrote:
On Thursday, February 12, 2004, 8:18:32 PM, Mauricio wrote:
On Thursday 12 February 2004 04:37, Gavin Sinclair wrote:
On Friday, February 13, 2004, 12:44:15 AM, Sean wrote:
(Dave Thomas: there's a question for you in the second paragraph; if you're
[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>
Index: cgi-lib.rb
* Gavin Sinclair (gsinclair@soyabean.com.au) wrote:
On Thursday, February 12, 2004, 11:39:37 PM, E wrote:
Hi,
Hi,
[#2422] Re: [ruby-cvs] ruby: * lib/ftools.rb: documented — "U.Nakamura" <usa@...>
Hello,
[#2449] make install not getting through rdoc phase — "David A. Black" <dblack@...>
Hi --
[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>
This is a common approach I use to object initialization; I don't know
On Fri, 20 Feb 2004 02:42:00 +0900, Dave Thomas wrote:
> > As more general suggestion. Could 'new' yield the new object is a block
On Fri, 20 Feb 2004 08:24:31 +0900, Carlos wrote:
Hi,
Yukihiro Matsumoto wrote:
On Feb 20, 2004, at 4:33 PM, Joel VanderWerf wrote:
[#2494] rehash segfault — Nathaniel Talbott <nathaniel@...>
I don't have a lot of information on this bug at this point, but
Hi,
On Wed, Feb 25, 2004 at 03:30:54AM +0900, Yukihiro Matsumoto wrote:
[#2504] foldl and foldr — "Sean E. Russell" <ser@...>
Sorry if I'm opening old wounds; I have a hard time believing that nobody has
Re: Standard libraries
>> Method documentation is neccesary to help people understand the code -
>> I agree.
>
> I hope you allow me, I don't agree.
Of course I allow you :) I'm curious what your reasons are.
> This should be a culture gap. If I
> want to soap/wsdl/xsd modules to be bundled with Ruby, I should accept
> the different culture. If I can't accept it, I distribute
> it separately as before (I don't like inline document added to my
> source even if someone else maintains the document instead of me).
>
> How "complete" document is needed?
Inline documentation is required just to allow 'ri' to help users
understand the library. Not detailed documentation of every private
method.
With soap/wsdl/xsd, I think an external document that gives the users a
good introduction and reference is the best. Then if I run 'ri SOAP' and
get "See http://www.nahi.home.page.com/soap.html", I'll be happy.
> class Row < Array
> # SYNOPSIS
> # CSV::Row#to_a
> #
> # RETURNS
> # An Array of String.
> #
> # DESCRIPTION
> # Convert CSV::Cell to String. Null is converted to nil.
> #
> def to_a
> self.collect { |cell| cell.is_null ? nil : cell.data }
> end
> ...
> end
>
> Is this comment needed?
This is how I would comment it.
class Row < Array
#
# Returns the strings contained in the row's cells.
#
def to_a
self.collect { |cell| cell.is_null ? nil : cell.data }
end
end
Notice I avoid duplication. You say "Returns an Array of String". But
to_a *obviously* returns an array. You name the method explicitly, but
there's no need. You mention "Null is converted to nil", but that is
entirely predictable behaviour. It's not unreasonable to document that,
though.
Notice that the single sentence I wrote as documentation is something that
is unlikely to change.
> And, all ext/* modules must be documented before the next stable
> release such as 1.8.2? Who...
Don't get too carried away ;) The proposed criteria for inclusion in the
standard library covered *new* additions. I don't think Matz will throw
half the current library away before 1.8.2 :)
Anyway, I'm going to start on strscan soon, as the docs already exist
elsewhere.
Cheers,
Gavin