I've done this in the past - is this the best way to do it?

#Add a \r character on non-Windows platforms
upload_file << "#{target.dump_output}"
upload_file << "\r" unless Config::CONFIG['target_os'] =~ /win/
upload_file << "\n"


-- 
Posted via http://www.ruby-forum.com/.