From: William Djaja Tjokroaminata Date: 2002-10-10T23:34:53+09:00 Subject: Re: Using Ruby Hash for Crytography? Hi David, Probably the problem is not that bad. A hash value can be populated with the default value only when the hash[key] is called as an rvalue. As an (imaginary) example: hsh = Hash.new ('a') puts hsh['x'] # >> 'a' puts hsh['y'] # >> 'a' hsh.keys # -> ['x', 'y'] Regards, Bill ========================================================================= dblack@candle.superlink.net wrote: > (Consider the alternative. If setting a default actually populated > the hash, what would hsh.keys consist of? :-)