Same code but unexpected return (LocalJumpError) only in certain contexts

Posted on stackoverflow but no traction yet:

Getting a unexpected return (LocalJumpError). Note that I don’t think it
has anything to do with ‘return’ being sent in as a type.

It is a problem that only happens in Rails autoloaded classes, but I’m
concerned that I might be doing something wrong in my gem as purely a
Ruby issue (the gem is not Rails-specific).

Anyone mind doing a code review?