📜  ruby 符号数组速记 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:23.038000             🧑  作者: Mango

代码示例1
2.4.2 :001 > a = 1
2.4.2 :002 > %i{one two #{a}+three} # Interpolation is ignored
 => [:one, :two, :"\#{a}+three"]
2.4.2 :003 > %I{one two #{a}+three} # Interpolation works
 => [:one, :two, :"1+three"]