From: Joel Pearson Date: 2013-01-19T05:58:41+09:00 Subject: Re: Adding file directory automatically "files[item" isn't valid. "files[item]" would be valid code... It's case-sensitive, so maybe you have an uppercase string and you're trying to compare it to a lowercase one? You'd get "nil" if your hash doesn't contain the key you're entering. Test that the hash contains the string and fail with a descriptive error if the conditions aren't right. Like this: if files[item].nil? fail TypeError, "item is not in hash: #{item.inspect}\n#{files.keys}" end -- Posted via http://www.ruby-forum.com/.