IO::write is Ruby 1.9.3+.