String concatenation vs. interpolation in Ruby

前端 未结 5 1151
北海茫月
北海茫月 2020-11-27 16:06

I am just starting to learn Ruby (first time programming), and have a basic syntactical question with regards to variables, and various ways of writing code.

Chris

5条回答
  •  生来不讨喜
    2020-11-27 16:21

    Here is a full benchmark which also compares Kernel#format and String#+ as it's all methods for construction dynamic string in ruby that I know

提交回复
热议问题