提交 ecbdec11 编写于 作者: A Aaron Patterson

making variable names a little more clear

上级 b6e28cea
......@@ -21,7 +21,8 @@ def reverse_merge(other_hash)
# Performs the opposite of <tt>merge</tt>, with the keys and values from the first hash taking precedence over the second.
# Modifies the receiver in place.
def reverse_merge!(other_hash)
merge!( other_hash ){|k,o,n| o }
# right wins if there is no left
merge!( other_hash ){|key,left,right| left }
end
alias_method :reverse_update, :reverse_merge!
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册