【发布时间】:2011-09-24 05:45:18
【问题描述】:
我开始使用 IRB 学习 Ruby,并在下面写了错误的代码:
irb(main):001:0>"amefurashi".delete(aiueo")
我注意到它缺少一个双引号,提示变为:
irb(main):002:1"
我写了正确的代码:
irb(main):001:1"amefurashi".delete("aiueo")
但为什么它不起作用?
【问题讨论】:
-
ruby-1.9.2-p290 :001 > "amefurashi".delete("aiueo") => "mfrsh"- 你希望发生什么?