これでいいんでは?

a = b = "abc"
a.replace "defg"
p a #=> "defg"
p b #=> "defg"

これができるのはStringだからであってFixnumでは無理。本題から外れてるぞ。