From: Greg Hauptmann Date: 2009-01-13T05:50:22+09:00 Subject: what's the rules re whether a Hash can use either a Symbol or String to reference the value??? ------=_Part_226557_15737008.1231793467193 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Getting confused with Hashes a bit. It seems sometimes I can use both a Symbol or a String to get the value back, but other times the Symbol doesn't work. Is there any rule re how to remember how Hash handles setting and getting values uses Symbol / String? e.g. hash_variable[:amount] versus hash_variable["amount"] e.g. hash_var = {:amount => 10}, versus hash_var = {"amount" => 10) -- Greg http://blog.gregnet.org/ ------=_Part_226557_15737008.1231793467193--