我在Ruby中有一个字符串:
sentence = "My name is Robert"
如何在不使用复杂代码或循环的情况下轻松替换此句中的任何一个单词?
ruby ruby-on-rails-3
ruby ×1
ruby-on-rails-3 ×1