title: How do I update Rails locale YAML file without loosing comments and variables?
body: <p>I'm building a Ruby script that changes the contents of the config/locales/*.yml Rails locales files. These files contain many useful comments and variables.</p>
  
  <p>By loading, updating, and dumping them, I loose these comments and variables.</p>
  
  <p>How do I programatically update the YAML file while preserving comments and variables?</p>