From: Phil Lou Date: 2013-05-10T15:10:08+09:00 Subject: Hash name is not recognized by Ruby unless first letter is capitalized Hi, all: My little test code below will not recognize the hash variable if its first letter is not capitalized. If the first letter is capitalized, then everything is OK. I'll appreciate any explanation for this behavior. =========================== # failure if declared as "mc". Must capitalize "M", lowercase "m" # such as "mc" will result in compilation errors. Mc = { "a" => "aay", "b" => "bee", "c" => "cee" } def pronounce (aStr) array_of_chars = aStr.split(""); array_of_chars.map { |eachChar| Mc[eachChar] }; end puts "#{pronounce("abc")}"; ============================ Thanks, PL -- Posted via http://www.ruby-forum.com/.