<=> comparison operator method undefined in AR class

Not really on point here but if slot_num is something that already
supports <=>, you can tidy up your method:

def <=>(other)
  self.slot_num <=> other.slot_num
end

As for the original problem, are you working in the development
environment? There are some odd issues that can creep into
development that have primarily to do with which classes are cached
and which are reloaded. The good news is that they don't (typically)
effect production code. To feel safe, it'd probably be worth building
some good unit tests.