Why does IO#close_read complain on a read-only IO object when it could just do the same as IO#close in that case? Similarly, for IO#close_write on a write-only IO object. matju