>_
new2coding
browse
topics
about
random
browse/
search
All
AI
Building software
Computers
Computer science
Databases
Infrastructure
Mobile
Networks
Programming languages
Security
The web
Tools
1 result
languages/ruby-strings-why-changing-b-also-changes-a.md
Ruby strings: why changing b also changes a
In Ruby, `b = a` does not copy a string: it puts a second label on the same object. So `b << "s"` changes `a` too, while `b += "s"` does…
4 min read · 16 Oct