From: Gani Ruthellen Date: 2007-08-08T03:04:41+09:00 Subject: Re: array.each puzzle from new ruby-er > Know that this is actually rebinding the local variable y to point to a > new object, not modifying the old object. If your goal was to modify the > array "lines", you should change "lines.each" to "lines.map" and make > sure you end the block with a statement that returns the modified y. > > perhaps: > lines.map do |y| > y = y.chomp("\x15").chomp > y = "" + y + "" if y =~ /^\*\*\*/ > y > end > > > Dan Sorry, actually doing each_with_index do |y,ind| (etc) and specifically setting lines[ind] = y but my original question remains: how do i make the "" + y leave off the \n so the output is text of y Thanks again -- Posted via http://www.ruby-forum.com/.