字符串在Ruby中是否可变?根据文件做
str = "hello"
str = str + " world"
Run Code Online (Sandbox Code Playgroud)
使用值创建一个新的字符串对象,"hello world"但是当我们这样做时
str = "hello"
str << " world"
Run Code Online (Sandbox Code Playgroud)
它没有提到它创建了一个新对象,它是否会改变str对象,现在它将具有值"hello world"?