John W Higgins wrote: > On Wed, Sep 16, 2009 at 9:20 AM, John W Higgins <wishdev / gmail.com> > wrote: > >> > >> x = "apple-orange-grape" >> tmp = x.split('-') >> (0..tmp.length-1).map{ |i| e[i..-1].join('-') } >> > > Sorry that should be > > (0..tmp.length-1).map{ |i| tmp[i..-1].join('-') } > > John trying to make this as a one liner a.split('.').map{ |i| a[i..-1].join('.') } but I am missing something -- Posted via http://www.ruby-forum.com/.