marcandre (Marc-Andre Lafortune) wrote in #note-2:
I'll reopen this, as you are asking for a mutating version of to_h.
It might be strange to have transform! as the destructive counterpart to to_h. Perhaps, the naming should be Hash#to_h!? Wait. That looks even more strange.
to_h works for me even though it is unintuitive a name for monadic mapping a hash. I wish we had a common name function name in Enumerable for monadic mapping that would return the same Class that we map over.