------art_11587_11443723.1192190955988
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 10/12/07, Giles Bowkett <gilesb / gmail.com> wrote:
>
> > This little problem is quite enjoyable:
> >
> > class String
> >   def delete_indices(*indices)
> >     indices.each do |index|
> >       self[index]  '
> >     end
> >     self
> >   end
> > end
>
> What's neat about that solution is that you can pass it a list or a range.
>
> >> "muppet".delete_indices(2,4)
> "mupe"
> >> "muppet".delete_indices(2..4)
> "mut"
>
> --
> Giles Bowkett



I love that observation, great point Giles! Truly enjoyable.

  ~Wayne

------art_11587_11443723.1192190955988--