Thanks guys for the replies. I believe Integer and Float way will work 
better than to_i or to_f. Because Integer and Float will check the 
parameter before conversion.

Regards
-- 
Posted via http://www.ruby-forum.com/.