class String def push_word(other) newself = self + other.to_s self.replace(newself) end end a = "this is a test" puts a.push_word "another"