ok, I have the following, very simple code:
f = \"String1\\n\\n\\nString2\\n\\n\\n\" f.each_line do |t| t.delete! \"\\n\" puts t.inspect end
f.squeeze("\n").each_line do |l| puts l end