(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