Created
August 14, 2015 14:54
-
-
Save scaint/559dd7bbb2341a1b4a64 to your computer and use it in GitHub Desktop.
wtf Rails?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hash1 = {"x" => 1} | |
xml = hash1.to_xml # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<hash>\n <x type=\"integer\">1</x>\n</hash>\n" | |
hash2 = Hash.from_xml(xml) # => {"hash"=>{"x"=>1}} | |
hash1 == hash2 # => false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment