introspect the RHS since it it is not guaranteed to be a Datastore
parent
d34119548d
commit
505810ffd6
|
@ -220,19 +220,15 @@ class DataStore < Hash
|
||||||
end
|
end
|
||||||
|
|
||||||
def merge!(other)
|
def merge!(other)
|
||||||
self.options.merge!(other.options)
|
super
|
||||||
self.aliases.merge!(other.aliases)
|
self.aliases.merge!(other.aliases) if other.respond_to?(:aliases)
|
||||||
self.imported.merge!(other.imported)
|
self.imported.merge!(other.imported) if other.respond_to?(:imported)
|
||||||
self.imported_by.merge!(other.imported_by)
|
self.imported_by.merge!(other.imported_by) if other.respond_to?(:imported_by)
|
||||||
end
|
end
|
||||||
|
|
||||||
def merge(other)
|
def merge(other)
|
||||||
ds = copy
|
ds = self.copy
|
||||||
ds.options.merge!(other.options)
|
ds.merge!(other)
|
||||||
ds.aliases.merge!(other.aliases)
|
|
||||||
ds.imported.merge!(other.imported)
|
|
||||||
ds.imported_by.merge!(other.imported_by)
|
|
||||||
ds
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue