ruby string concatenation(我想?)

Zac*_*ese 1 ruby string string-concatenation

我刚刚开始使用"The Well-Grounded Rubyist",他们给出了以下示例:

print "Hello. Please enter a Celsius value: "
print "The Fahrenheit equivalent is ", gets.to_i * 9 / 5 + 32, ".\n"
Run Code Online (Sandbox Code Playgroud)

特别是,我正在看第2行,他们似乎在使用逗号进行字符串连接.我假设+因为+ 32代码的一部分而没有使用该符号.但是,有人可以向我解释一下逗号究竟在做什么吗?

Chu*_*uck 10

逗号是参数分隔符.该print方法可以采用任意数量的参数,并将按顺序打印它们.任何字符串连接(如果在此处发生)都将在print方法本身内发生.