Class(es) become NIL .. how?

Hi,

I’ve written a mail gateway in ruby. It is in the log-run (stress)test
phase. I’ve encounter the following weird phenomen: The daemon suddenly
forgot one of its class that is rather the class became to NIL. Soon
after the daemon silently exit and died. I cannot settle whether is it
my program’s fault or Ruby’s fault or The Sequel’s fault (Because the
class that became to NIL is a Sequel::Model class).

How can debug or trace a problem like this? How can define the source of
the problem (program, ruby,sequel)?

Any advice are welcome

Thank you

Laszlo