title: How do I compare two hashes?
body: <p>I am trying to compare two Ruby Hashes using the following code:</p>
  
  <pre><code>#!/usr/bin/env ruby
  
  require "yaml"
  require "active_support"
  
  file1 = YAML::load(File.open('./en_20110207.yml'))
  file2 = YAML::load(File.open('./locales/en.yml'))
  
  arr = []
  
  file1.select { |k,v|
    file2.select { |k2, v2|
      arr &lt;&lt; "#{v2}" if "#{v}" != "#{v2}"
    }
  }
  
  puts arr
  </code></pre>
  
  <p>The output to the screen is the full file from file2. I know for a fact that the files are different, but the script doesn't seem to pick it up.</p>