Why can you safely use a string as a hash key, even though a string is mutable?

Technology CommunityCategory: RubyWhy can you safely use a string as a hash key, even though a string is mutable?
VietMX Staff asked 3 years ago

Because the interpreter makes a private copy of a string used as a hash key.