If you want to get what is the difference between two hashes, you can do 
this:


result = {}
hash1.each {|key, value| result[key] = hash2[key] if hash2[key] != value }
puts result 

or use a this hash1.to_a == hash2.to_a turning it to an array and compairing 
those. or you could use to_s compare strings. 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/de8e95af-a6ac-4724-8fe6-9bd7f9017cda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to