From: Nobuyoshi Nakada Date: 2013-11-22T13:24:58+09:00 Subject: [ruby-core:58480] Re: Object identity for string hash keys (13/11/22 8:37), Andrew Vit wrote: > Why does Hash::[] dup the given strings and create new instances? > (CSV#to_hash uses this, so each row initializes new strings for the same > header keys.) It seems like a lot of unnecessary overhead. To get rid of modifying the key by accident, String keys are copied and frozen. -- Nobu Nakada