From: Wybo Dekker Date: 2005-12-07T18:51:52+09:00 Subject: Re: bug in mailread.rb, and: proposal for Mail#to_s On Tue, 6 Dec 2005, daz wrote: > Wybo Dekker wrote: > > > On Tue, 6 Dec 2005, Yukihiro Matsumoto wrote: > > > > > I think to_s is not sufficient for string representation of whole mail > > > body. It's just too long. I agreed to add a new method to do this > > > work. Any name suggestion? > > > > > > [ # Return a Mail object, ready to print, [...] ] > > def to_print > ... > end this suggests that it's meant for printing. Actually, it is the reverse of what mailread does. mailread reads the information of an e-mail message from an mbox file into a Mail object. The proposed method re-assembles this information into a string (perhaps after editing it), ready be to written (back) to an mbox file. Hence my proposal to name it to_s or assemble. How about to_mbox ? Another point which should be considered is that mailread drops all Receiver: fields except the last one. This is fine for me, but if I were, for example, the developer of a mail reading application (like pine or mutt) in Ruby, I wouldn't be happy with that... but maybe it's considered stupid to do such developments in Ruby. -- Wybo