Skip to content

Instantly share code, notes, and snippets.

@joshuakfarrar
Created December 26, 2014 21:12
Show Gist options
  • Save joshuakfarrar/dc04a7872e15ec102127 to your computer and use it in GitHub Desktop.
Save joshuakfarrar/dc04a7872e15ec102127 to your computer and use it in GitHub Desktop.
[9] pry(main)> def returns_hash
[9] pry(main)* { :c => :d }
[9] pry(main)* end
=> nil
[10] pry(main)> a = { :a => :b }
=> {:a=>:b}
[11] pry(main)> a.merge! returns_hash
=> {:a=>:b, :c=>:d}
[12] pry(main)> a
=> {:a=>:b, :c=>:d}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment