From: mike@... (Mike Stok) Date: 2003-07-21T01:35:43+09:00 Subject: Re: Array and Hash to_s In article <004f01c34ec6$99a00c80$0100000a@chrismo>, Chris Morris wrote: >class Array > def to_s > res = '' > each do |element| > res << ', ' if !res.empty? > res << element > end > res > end >end It may be simpler to achieve this by saying: class Array def to_s join(', ') end end Mike -- mike@stok.co.uk | The "`Stok' disclaimers" apply. http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA mike@exegenix.com | Fingerprint 0570 71CD 6790 7C28 3D60 http://www.exegenix.com/ | 75D2 9EC4 C1C0 0599 13DA