From: ajay paswan Date: 2012-10-09T05:35:25+09:00 Subject: Re: Undefined method `-' for nil Go into the function: bank.moves_loans and for each '-' operation check operand, I am 100 % sure that one of the operand becomes NIL at some point. Looking at your question, I would like to give an explicit answer, which is not expected here: for each statement involving '-' viz: a=b-c replace it by: if b==nil or c==nil puts "My 100% is proved, here is the error" else a=b-c end -- Posted via http://www.ruby-forum.com/.