P.S. It's not normal ruby practice to return 0 or 1 for boolean 
conditions. You should return false (or nil), and true (or any value 
other than nil or false)

Then you can say:

  if check

rather than

  if check == 1

Regards,

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