我想用这个哈希值做一个数学运算,例如:;
hash = {"Num"=>4} hash["Num"] = hash["Num"-1]
PS我知道这会导致错误,所以请说明正确的方法.
ruby hash
hash ×1
ruby ×1