fix copy_stream test for Rubinius and JRuby