fails:IO#to_i raises IOError on closed stream
