diff --git a/lib/mongo/util/xml_to_ruby.rb b/lib/mongo/util/xml_to_ruby.rb index 18446ee..b053c93 100644 --- a/lib/mongo/util/xml_to_ruby.rb +++ b/lib/mongo/util/xml_to_ruby.rb @@ -44,6 +44,8 @@ class XMLToRuby e.text.to_f when 'string', 'code' e.text.to_s + when 'symbol' + e.text.to_s.intern when 'boolean' e.text.to_s == 'true' when 'array' diff --git a/tests/data/smorgasbord.bson b/tests/data/smorgasbord.bson index bbd7700..571013a 100644 Binary files a/tests/data/smorgasbord.bson and b/tests/data/smorgasbord.bson differ diff --git a/tests/data/smorgasbord.xml b/tests/data/smorgasbord.xml index b543c2d..328107a 100644 --- a/tests/data/smorgasbord.xml +++ b/tests/data/smorgasbord.xml @@ -1,7 +1,7 @@ - 4ea067497065180748000000 + 33dc67499236d9a01a000000 42 foo true @@ -17,7 +17,7 @@ 1231515664416 namespace - 4ea067497065180748010000 + 33dc67499236d9a01a010000 foobar @@ -25,5 +25,6 @@ this is code + symbol_value