summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-29 03:09:00 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-29 03:09:00 +0000
commita69756de6771d5140da6c330e16961e982676b70 (patch)
treeb57d3093739e278fe7d5fdeebbc76963322ae970 /ext/readline
parent29dbed183e78db090032ae6d854aa44e34652bba (diff)
* ext/readline/readline.c (readline_getc): Consider
NULL as input. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/readline')
-rw-r--r--ext/readline/readline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 269ebc9..820c6b7 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -204,6 +204,8 @@ static int
readline_getc(FILE *input)
{
struct getc_struct data;
+ if (input == NULL) /* editline may give NULL as input. */
+ input = stdin;
data.input = input;
data.fd = fileno(input);
again: