diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dl/dl.c | 2 | ||||
-rw-r--r-- | ext/pty/pty.c | 2 | ||||
-rw-r--r-- | ext/socket/socket.c | 1 |
3 files changed, 1 insertions, 4 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c index 1469ff82a7..d92347158f 100644 --- a/ext/dl/dl.c +++ b/ext/dl/dl.c @@ -542,7 +542,7 @@ rb_io_to_ptr(VALUE self) FILE *fp; GetOpenFile(self, fptr); - fp = fptr->f; + fp = rb_io_stdio_file(fptr); return fp ? rb_dlptr_new(fp, sizeof(FILE), 0) : Qnil; } diff --git a/ext/pty/pty.c b/ext/pty/pty.c index d47acbe5b5..8e9e63036c 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -428,12 +428,10 @@ pty_getpty(argc, argv, self) rfptr->mode = rb_io_mode_flags("r"); rfptr->fd = info.fd; - rfptr->f = rb_fdopen(info.fd, "r"); rfptr->path = strdup(SlaveName); wfptr->mode = rb_io_mode_flags("w") | FMODE_SYNC; wfptr->fd = dup(info.fd); - wfptr->f = rb_fdopen(wfptr->fd, "w"); wfptr->path = strdup(SlaveName); res = rb_ary_new2(3); diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 9f8e747841..83a70b203d 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -183,7 +183,6 @@ init_sock(sock, fd) MakeOpenFile(sock, fp); fp->fd = fd; - fp->f = rb_fdopen(fd, "r+"); fp->mode = FMODE_READWRITE; if (do_not_reverse_lookup) { fp->mode |= FMODE_NOREVLOOKUP; |