Skip to content

Instantly share code, notes, and snippets.

@mwmitchell
Created April 7, 2010 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mwmitchell/359148 to your computer and use it in GitHub Desktop.
Save mwmitchell/359148 to your computer and use it in GitHub Desktop.
# recursively compare the keys of these hashes, making sure that two has the same keys as one
one = {:id => 1, :items => [{:name => 'one'}, {:name => 'one:one'}]}
two = {:id => 2, :items => [{:name => 'two'}, {:name => 'two:two'}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment