chriswailes/RLTK — pull request #27 by benedikt (2013-10-23 08:58:48+00:00)
Title: Add Rubinius compatibility

This pull request adds Rubinius compatibility. The only problem that prevented RLTK from running on Rubinus, was the different behavior of `Array#each` in Rubinius. While it is possible to append new elements to the array while enumerating it in MRI, the enumeration would stop after the original number of elements in Rubinus.

This pull request changes the behavior of `RLTK::Parser::State#each` to properly enumerate all items, including those added while enumerating.

Additionally it adds `RLTK::Parser#each_state` to enable the same behavior for the `@states` array.

Please let my know, if you want me to adjust my implementation in any way.

Thanks a lot for the RLTK gem. It's been a pleasure to work with it!