How can I determine new line separator used by OS (LF, CR/LF or other), in Ruby?
File.open("some_temporary_file", "w") { |file| file.puts } new_line_separator = File.open("some_temporary_file", "rb") { |file| file.read }