To append to an existing string this is what I am doing.
s = 'hello'
s.gsub!(/$/, ' world');
Is there a better way to append to an existing string.
Before someone suggests following answer lemme show that this one does not work
s = 'hello'
s.object_id
s = s + ' world'
s.object_id
In the above case object_id will be different for two cases.