require StringIO (in case we run jruby) [ci skip]