Automata library, implemented in pure Ruby. It supports a number of regular language operations, and can be visualised graphically.