title: How do I make ruby 1.9.3 write newlines to a text file?
body: <p>I'm using Windows 7. With Ruby 1.8.7, writing to a text file with <code>puts</code> added a newline so that these irb commands:</p>
  
  <pre><code>my_file = File.new("C:\\new_file.txt", "w+")
  my_file.puts("first line")
  my_file.puts("\n\n")
  my_file.puts("")
  my_file.puts("fifth line")
  my_file.close
  </code></pre>
  
  <p>results in a text file that reads:</p>
  
  <blockquote>
    <p>first line</p>
    
    <p>...three blank lines here (the editor seems to be stripping newlines
    too)</p>
    
    <p>fifth line</p>
  </blockquote>
  
  <p>In Ruby 1.9.3, the newlines are stripped, even when I try to force one by adding a <code>\n</code>, resulting in a text file that reads:</p>
  
  <blockquote>
    <p>first linefifth line</p>
  </blockquote>
  
  <p>Does anyone know what changed and what I need to do to restore newlines to my file?</p>