What is the easiest way to replace a word in a string in Ruby?
I have the following string:
sentence = "My name is Robert"
How can I replace a specific word in this sentence without using complex code or a loop? What are the best methods for Ruby string replace operations?