x = 4 y = 5 {y,x} = {x,y} y # => 4 x # => 5 [x,y] = [y,x] x # => 4 y # => 5