summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-bf
blob: 0d9f069139ffe239aeb93523352388f54466815b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-bf,v 1.1 2005/11/02 08:56:40 taca Exp $

--- ext/readline/readline.c.orig	2005-05-25 22:01:56.000000000 +0900
+++ ext/readline/readline.c
@@ -69,10 +69,12 @@ readline_readline(argc, argv, self)
 
     if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");
 
+    Check_Type(rb_stdout, T_FILE);
     GetOpenFile(rb_stdout, ofp);
-    rl_outstream = ofp->f;
+    rl_outstream = GetWriteFile(ofp);
+    Check_Type(rb_stdin, T_FILE);
     GetOpenFile(rb_stdin, ifp);
-    rl_instream = ifp->f;
+    rl_instream = GetReadFile(ifp);
     buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
                               &status);
     if (status) {