use rb_wait_for_single_fd in ruby 2.0