Object#become Swaps one object for another One stupid implementation: 1 static VALUE ruby_become(VALUE self, VALUE newobj) { 2 /* Not implemented here: type check, frozen check, $SAFE check */ 3 4 struct RObject * robj1 = ROBJECT(obj1); 5 struct RObject * robj2 = ROBJECT(obj2); 6 struct RObject tmp_obj; 7 8 tmp_obj = *robj1; 9 *robj1 = *robj2; 10 *robj2 = tmp_obj; 11 12 return self; 13 }