我见过很多输出变量的方法。这些方法中哪个“更好”?
my_name = 'Jeff Hall'
my_height = 74
puts "Let's talk about %s." % my_name
puts "He's %d inches tall." % my_height
对比
puts "Let's talk about #{my_name}."
puts "He's #{my_height} inches tall."
另外,s
和d
之后代表%
什么?