1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

console.c: default by stty raw

* ext/io/console/console.c (rawmode_opt): use default values by `stty
  raw`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-05 04:27:57 +00:00
parent e29e4b55ab
commit 490f1fc009
3 changed files with 24 additions and 8 deletions

View file

@ -105,7 +105,8 @@ rawmode_opt(int argc, VALUE *argv, rawmode_arg_t *opts)
if (!NIL_P(vopts)) {
VALUE vmin = rb_hash_aref(vopts, ID2SYM(rb_intern("min")));
VALUE vtime = rb_hash_aref(vopts, ID2SYM(rb_intern("time")));
opts->vmin = 0;
/* default values by `stty raw` */
opts->vmin = 1;
opts->vtime = 0;
if (!NIL_P(vmin)) {
opts->vmin = NUM2INT(vmin);