Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit c40e0404 authored by Jérémie Gaidamour's avatar Jérémie Gaidamour

[dev] Fixed deep_merge

parent e8ffd86d
......@@ -88,7 +88,7 @@ class ::Hash
key = key.to_sym if key_ab.is_a?(Symbol)
# For duplicate entries, the value of PREFIX-x is kept.
self[key] = deep_merge_entries(value_ab, self[key]).clone
self[key] = deep_merge_entries(deep_copy(value_ab), self[key]).clone
}
else
......@@ -101,7 +101,7 @@ class ::Hash
next if not x or x.to_i < a
# For duplicate entries, the value of PREFIX-x is kept.
self[key_x] = deep_merge_entries(value_ab, value_x).clone
self[key_x] = deep_merge_entries(deep_copy(value_ab), value_x).clone
}
end
......@@ -148,4 +148,8 @@ class ::Hash
}
end
def deep_copy(o)
Marshal.load(Marshal.dump(o))
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment