On Aug 17, 1:30 pm, "Simon Schuster" <significa... / gmail.com> wrote:
> in this case a "\n"...
>
> ["blah\n", "la\n", "hooray\n"]
>
> array.collect { |x| x - "\n" } doesn't work, and I can't manage to
> find any methods which might do the trick.. pretty basic, but I'm
> still a beginner! thanks.

If you want to remove all leading and trailing whitespace:

array.map{|x| x.strip }