Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ruby language fun
1.8.7 :001 > h = {:foo_1=>"bar_1", :foo_2=>"bar_2"}
=> {:foo_1=>"bar_1", :foo_2=>"bar_2"}
1.8.7 :002 > j = {:foo_2=>"bar_2", :foo_1=>"bar_1"}
=> {:foo_1=>"bar_1", :foo_2=>"bar_2"}
1.8.7 :003 > h == j
=> true
1.8.7 :004 > h.to_s == j.to_s
=> true
1.9.3p194 :001 > h = { :foo_1 => 'bar_1', :foo_2 => 'bar_2' }
=> {:foo_1=>"bar_1", :foo_2=>"bar_2"}
1.9.3p194 :002 > j = {:foo_2=>"bar_2", :foo_1=>"bar_1"}
=> {:foo_2=>"bar_2", :foo_1=>"bar_1"}
1.9.3p194 :003 > h == j
=> true
1.9.3p194 :004 > h.to_s == j.to_s
=> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.