Brian Candler wrote:

> 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)

You were right, I did not assign a value to the global variable 
$username, so I did  that and the test ran. Thank you very much.
-- 
Posted via http://www.ruby-forum.com/.