clone dup 和= 到底是啥区别?
a = {:x=>'xxx', :y=>'yyy', :z=>{:zz=>"zzz"}}
b = a
c = a.clone
d = a.dup
b[:x] = 'bbb'
c[:y] = 'ccc'
d[:z][:zz] = 'ddd'
p a
p b
p c
p d
{:x=>"bbb", :y=>"yyy", :z=>{:zz=>"ddd"}} {:x=>"bbb", :y=>"yyy", :z=>{:zz=>"ddd"}} {:x=>"xxx", :y=>"ccc", :z=>{:zz=>"ddd"}} {:x=>"xxx", :y=>"yyy", :z=>{:zz=>"ddd"}}