Skip to content

Instantly share code, notes, and snippets.

@boris317
Created September 14, 2012 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boris317/3722866 to your computer and use it in GitHub Desktop.
Save boris317/3722866 to your computer and use it in GitHub Desktop.
existing_hash = {:foo=>"bar"}
other_hash.each_pair do |key, value|
if some_condition
existing_hash[key] = value
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment