@Brian. Thanks a lot. You are correct.

It runs now without errors, but the remaining case is, how can I display 
the result (Array) as the one that appeared when running the program 
using "irb"?
-- 
Posted via http://www.ruby-forum.com/.