From: dblack@... Date: 2006-03-04T00:24:13+09:00 Subject: Re: string slice elegant way Hi -- On Sat, 4 Mar 2006, Mage wrote: > Mage wrote: > >> Thank you, I`ve only tried a[2,-1] before the letter. My fault. > > By the way, ranges ending with lesser number than beginning seems nasty > objects to me. Their "member?" and "each" methods are not usable. Are they > good for anything beyond string slicing? They're not good for that either; [2,-1] isn't a range object :-) I can't remember exactly what's been said in the past about backwards ranges, but I know stuff has been said. There's a ton of range discussion in the ruby-talk archives. You'll find just about every possible like, dislike, suggestion for change, etc., represented. David -- David A. Black (dblack@wobblini.net) Ruby Power and Light (http://www.rubypowerandlight.com) "Ruby for Rails" chapters now available from Manning Early Access Program! http://www.manning.com/books/black