introspect the RHS since it it is not guaranteed to be a Datastore

GSoC/Meterpreter_Web_Console
Brent Cook 2018-04-24 06:15:05 -05:00
parent d34119548d
commit 505810ffd6
1 changed files with 6 additions and 10 deletions

View File

@ -220,19 +220,15 @@ class DataStore < Hash
end
def merge!(other)
self.options.merge!(other.options)
self.aliases.merge!(other.aliases)
self.imported.merge!(other.imported)
self.imported_by.merge!(other.imported_by)
super
self.aliases.merge!(other.aliases) if other.respond_to?(:aliases)
self.imported.merge!(other.imported) if other.respond_to?(:imported)
self.imported_by.merge!(other.imported_by) if other.respond_to?(:imported_by)
end
def merge(other)
ds = copy
ds.options.merge!(other.options)
ds.aliases.merge!(other.aliases)
ds.imported.merge!(other.imported)
ds.imported_by.merge!(other.imported_by)
ds
ds = self.copy
ds.merge!(other)
end
#