rails/rails — Issue #3947: Hash.from_xml is inconsistient when the xml is genereated with :skip_types => true
Author: spencerroan
Created: 2011-12-12 16:06:20+00:00
State: open

ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.8.0]
activesupport (3.1.3)

I'd like to do a round trip from hash, xml and back to hash.
With :skip_types => true I don't get what I started with, perhaps without types it doesn't have enough information to rebuild.
```irb
require 'active_support/all'
Hash.from_xml({'a' => {"b" => 'c'}, 'b' => [1,2,3]}.to_xml(:skip_types => true))
=> {"hash"=>{"a"=>{"b"=>"c"}, "b"=>{"b"=>["1", "2", "3"]}}}
```
The xml is pretty similar regardless of the flag.

```puts ( {'a' => {"b" => 'c'}, 'b' => [1,2,3]}.to_xml())

c

1
2
3

```

```puts ( {'a' => {"b" => 'c'}, 'b' => [1,2,3]}.to_xml(:skip_types => true))

c

1
2
3

```

Looks like without the array type it doesn't know to pack all of those sub elements.