Fix doc

[ci skip]
to close fd, should be use rb_thread_fd_close()
Add check function