--001485e9ab1a2392d20473b466ab
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Sep 16, 2009 at 9:20 AM, John W Higgins <wishdev / gmail.com> wrote:

> Good Morning,
>
> On Wed, Sep 16, 2009 at 9:01 AM, Re BR <rereis / hotmail.com> wrote:
>
> > Hello all,
> >
> > I have a string "apple-orange-grape". I need to create a array that will
> > look like
> > ["apple-orange-grape","orange-grape","grape"]
> >
> >
> x  apple-orange-grape"
> tmp  .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

--001485e9ab1a2392d20473b466ab--