summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/readline/readline.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a8278f..a0278fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 4 10:12:39 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * ext/readline/readline.c (readline_event): use rb_wait_for_single_fd().
+ The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531]
+
Wed May 4 10:10:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* ext/socket/init.c (wait_connectable): use rb_wait_for_single_fd().
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index cb17d9c..c08d88b 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -145,11 +145,7 @@ readline_event(void)
#if BUSY_WAIT
rb_thread_schedule();
#else
- rb_fdset_t fds;
-
- rb_fd_init(fds);
- rb_fd_set(fileno(rl_instream), &fds);
- rb_thread_fd_select(fileno(rl_instream) + 1, &fds, NULL, NULL, NULL);
+ rb_wait_for_single_fd(fileno(rl_instream), RB_WAITFD_IN, NULL);
return 0;
#endif
}