Skip to content

Instantly share code, notes, and snippets.

@kingscott
Created November 30, 2016 19:32
Show Gist options
  • Save kingscott/b83fb9b067445b28eed535de4b41e998 to your computer and use it in GitHub Desktop.
Save kingscott/b83fb9b067445b28eed535de4b41e998 to your computer and use it in GitHub Desktop.
normalized_changes = [].select do |k|
old_values[k] != new_values[k]
end.inject({}) do |h, k|
h[k] = [old_values[k], new_values[k]]
h
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment