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.
我需要一根红宝石绳子,"\("并在我身上发现了逃跑的把戏。
"\("
"\("给我"(" "\\("给我"\\("
"("
"\\("
"\\("是正确的,问题是inspect(这是IRB用来显示最后一次调用的返回值)的结果与实际内容不一样,因为转义:
inspect
puts "\\(".inspect #prints: "\\(" puts "\\(" #prints: \(
如果您不需要插值,只需使用单引号:
puts '\(' #prints: \(