From 571433c010c073202ace58f7619c0f54f48879e6 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Fri, 31 Jan 2014 10:56:06 +1000 Subject: [PATCH] nokogiri attributes workaround support for 1.6.x --- lib/rbvmomi/deserialization.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/rbvmomi/deserialization.rb b/lib/rbvmomi/deserialization.rb index a245bf2d..c5649a46 100644 --- a/lib/rbvmomi/deserialization.rb +++ b/lib/rbvmomi/deserialization.rb @@ -42,7 +42,13 @@ def initialize conn end def deserialize node, type=nil - type_attr = node['type'] + if type_attr = node['type'] + elsif node.attributes['type'] + # Work around for 1.5.x which doesn't populate node['type'] + # XXX what changed + type_attr = node.attributes['type'].value + end + type = type_attr if type_attr if action = BUILTIN_TYPE_ACTIONS[type]