Ruby-compatible and failsafe generators