From: Brian Candler Date: 2009-11-10T00:18:02+09:00 Subject: Re: TypeError: nil is not a symbol error when running tests Arti Singh wrote: > TypeError: nil is not a symbol error when runing test. > > Has anyone seen this error before? Post the exact exception report using copy-paste, because it will include a backtrace, and the first line will give the line number where the error occurred. If this is inside a library, look at subsequent lines of the backtrace until you find a line in your own source. Then indicate which line of the source code this is. If I had to guess where the problem is, I would say getElementName(array,$s_name) because you don't appear to have initialised the global variable $s_name to anything, and therefore this would be the same as getElementName(array,nil) (@s_name and $s_name are two completely different things) -- Posted via http://www.ruby-forum.com/.