I'm not sure if this is a bug or not, but shouldn't StringIO simulate  
the IO encoding methods (external_encoding() and  
internal_encoding())?  I'm thinking internal_encoding() could always  
return nil and external_encoding() could just be a shortcut for  
str_io.string.encoding().  Thoughts?

James Edward Gray II