eof? should raise an IOError if it is not opened for reading.

This commit is contained in:
Tomoyuki Sahara
2016-09-30 17:10:55 +09:00
parent 2229a2aa0f
commit f6a82772e6
4 changed files with 23 additions and 6 deletions
+2 -1
View File
@@ -13,7 +13,8 @@ struct mrb_io {
int fd; /* file descriptor, or -1 */
int fd2; /* file descriptor to write if it's different from fd, or -1 */
int pid; /* child's pid (for pipes) */
unsigned int writable:1,
unsigned int readable:1,
writable:1,
sync:1;
};