lib/rbvmomi/vim.rb in rbvmomi-1.4.0 vs lib/rbvmomi/vim.rb in rbvmomi-1.5.0

- old
+ new

@@ -39,27 +39,12 @@ end end end def close - VIM::SessionManager(self, 'SessionManager').Logout + VIM::SessionManager(self, 'SessionManager').Logout rescue RbVmomi::Fault + self.cookie = nil super - end - - def cookie= cookie - super - ObjectSpace.undefine_finalizer self - ObjectSpace.define_finalizer(self, self.class.finalizer(cookie,@opts)) - end - - def self.finalizer cookie, opts - proc do |object_id| - new(opts).tap do |vim| - vim.instance_variable_set :@cookie, cookie - vim.close - end - nil - end end def rev= x super @serviceContent = nil