move super call in merge! so that it returns the proper value

This commit is contained in:
Brent Cook
2018-04-27 14:21:57 -05:00
parent 916b4b2261
commit ee2ad8affe
+2 -1
View File
@@ -235,12 +235,13 @@ class DataStore < Hash
# Override merge! so that we merge the aliases and imported hashes
#
def merge!(other)
super
if other.is_a? DataStore
self.aliases.merge!(other.aliases)
self.imported.merge!(other.imported)
self.imported_by.merge!(other.imported_by)
end
# call super last so that we return a reference to ourselves
super
end
#