StopIteration is defined in mruby-enumerator, not in core.

If you build mruby without mruby-enumerator, Kernel.loop fails because StopIteration is not defined.