ref: refs/heads/use-activeresource
commit f538c7051ed91e0917cdff52a4dc860c3f2180eb
Author: Martin Vidner
Date: Tue Sep 15 14:24:57 2009 +0200
Do not use string_serialization, it breaks Hash#to_xml :-(
---
plugins/network/lib/string_serialization.rb | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/plugins/network/lib/string_serialization.rb b/plugins/network/lib/string_serialization.rb
index 7edaba3..4787064 100644
--- a/plugins/network/lib/string_serialization.rb
+++ b/plugins/network/lib/string_serialization.rb
@@ -1,5 +1,18 @@
# fixing serialization of arrays of plain strings
+# DO NOT USE, it breaks Hash#to_xml:
+# h = {"foo" => "bar", "baz" => "qux"}
+# before:
+# <hash>
+# <baz>qux</baz>
+# <foo>bar</foo>
+# </hash>
+# after:
+# <hash>
+# <string>qux</string>
+# <string>bar</string>
+# </hash>
+
class String
def to_xml(options = {})
require 'builder' unless defined?(Builder)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org