summaryrefslogtreecommitdiff
path: root/ext/io
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-03 07:54:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-03 07:54:18 +0000
commitf050b2232711c162ee380ba61ddb8554cb4f7719 (patch)
treeb9c878f7d576b5435781bcb996815dc647f87df1 /ext/io
parent47dc049f6190c2bdc68b734bab67bcf19d1df02c (diff)
console.c: fix unit of min
* ext/io/console/console.c (rawmode_opt): min is minimum characters, not tenths. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/io')
-rw-r--r--ext/io/console/console.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index cedc057..61b3125 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -105,13 +105,12 @@ 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")));
- VALUE v10 = INT2FIX(10);
if (!NIL_P(vmin)) {
- vmin = rb_funcall3(vmin, '*', 1, &v10);
opts->vmin = NUM2INT(vmin);
optp = opts;
}
if (!NIL_P(vtime)) {
+ VALUE v10 = INT2FIX(10);
vtime = rb_funcall3(vtime, '*', 1, &v10);
opts->vtime = NUM2INT(vtime);
optp = opts;