What's the difference between a string and a symbol in Ruby?

后端 未结 10 1320
说谎
说谎 2020-11-28 06:52

What\'s the difference between a string and a symbol in Ruby and when should I use one over the other?

10条回答
  •  醉话见心
    2020-11-28 07:20

    Symbols and strings are completely different this post has a little insight into the differences. As to when and where to use them, there is a pretty extensive post on this subject over on has many :through.

提交回复
热议问题