I'd store the state info in an instance variable of the class instance and
not use a class variable, because the latter is inherited and thus visible
to sub classes.

I also wonder why your state machine runs automatically in method run.
Normally you trigger every transition externally with an event.  That way
you could still do a looping with little additional effort but you had a
lot more flexibility.  I'd possibly change it in a way that the current
event is passed to the condition block as an argument.

Also, is it possible that you use 0 to mean "false"? This is true for Perl
but not Ruby.  In Ruby the only two values that are equivalent to false
are false itself and nil.

Regards

    robert