Notes posted by xxjjnn
RSS feed
0 thanks
Possible bug
Works as expected for non bang methods
> a={x:1, y:2, z:3} => {:x=>1, :y=>2, :z=>3} > a.slice(:y) => {:y=>2} > a.except(:y) => {:x=>1, :z=>3}
Bug on slice! it behaves like except!
> a.clone.slice!(:y) => {:x=>1, :z=>3} > a.clone.except!(:y) => {:x=>1, :z=>3}
slice! should return {:y=>2} and modify a to no longer have it