It is meant to be the output of the function. I usually save defensive programming for when crossing layers of encapsulation.  In this case tokenizer_next_method is just a ruby wrapper around a C method.  If you are still concerned, then I could initialize all the fields of the struct at the start of tokenizer_next.