From: Wiktor Macura Date: 2006-06-01T04:29:39+09:00 Subject: Constant Hash strangeness Hello. This seems to be trivial, yet I can't find an explanation for it anywhere online. Apologies if I'm asking the obvious. If you create a constant hash: CONSTANTHASH = { :foo => "foobar" } x = CONSTANTHASH[:foo] x << "-suffix" p CONSTANTHASH One gets the following output: { :foo => "foobar-suffix" } nil So, this sort of makes sense if one considers that variables in Ruby are references. So Ruby only protects the hash, not the values keys in the hash point to. But... is there any way to protect the values, and not just the keys? Thanks. Warm Regards, Wiktor Macura