Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试执行这样的代码:
template = " ... here html tags [sitename] ... here html tags " template = template.gsub(/\[sitename\]/,"http://google.com")
但它不起作用。我的错误是什么?
你能描述它是如何不工作的吗?
在 ruby 1.9.2 中,我得到了我所期望的命令
puts template
给
... here html tags http://google.com ... here html tags