From: Daniel Waite Date: 2007-11-01T07:43:27+09:00 Subject: Re: Sorting a string... David Mullet wrote: > class String > def sort > self.split('').sort.join > end > end > > 'cba'.sort #=> "abc" Brilliant! Thanks, David. I love this community. :) I had tried split, but in haste, with no arguments. However, after reading the docs again I see no arguments equals a space. Interesting how the documentation has a perfect example: "hello".split(//) #=> ["h", "e", "l", "l", "o"] When writing that extension I kept thinking, all I need is an array, how can I get one? Now I know! -- Posted via http://www.ruby-forum.com/.