@nobu, I didn't get any segfaults for StringIO or File and it rejected the invalid types I tried. Would you mind giving me some details on what you did to test it?

@charliesome, is there a way you would recommend checking for this case?