IO.for_fd can be written in Ruby.
fix mrb_raisef usage.