From: "NAKAMURA, Hiroshi" Date: 2004-02-13T15:00:22+09:00 Subject: Re: Standard libraries Hi, > From: "Dave Thomas" > Sent: Friday, February 13, 2004 2:10 PM > > 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 Sorry, I found wrong DESCRIPTION. Convert to string? It returns an Array of cell.data. Source means everything. > I don't think all of it is. I might document it as > > # Return this row as an Array containing Strings or +nil+ > def to_a > ... > end I relieved to hear that. Thanks. Though I still think "self.collect { |cell| cell.is_null ? nil : cell.data }" could be enough for a programmer who read it... Regards, // NaHi