From: Logan Capaldo Date: 2006-03-04T05:08:17+09:00 Subject: Re: string slice elegant way --Apple-Mail-16--99477032 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Mar 3, 2006, at 10:24 AM, dblack@wobblini.net wrote: > [2,-1] isn't a range object :-) It also doesn't work, at least not the way the OP wanted it to. But 2..-1 does. % ruby -v ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0] % irb irb(main):001:0> "hello world"[2, -1] => nil irb(main):002:0> "hello world"[2..-1] => "llo world" --Apple-Mail-16--99477032--