aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reline.rb
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2023-08-21 02:03:28 +0900
committergit <svn-admin@ruby-lang.org>2023-08-20 17:03:32 +0000
commit405c295a21ba83e032cd2cc5a86e1edf9ee14ff4 (patch)
tree7d5f5833bbe41d25641f51634c96242b739065b0 /lib/reline.rb
parent812272bdb2e2f68baa7da4b0a977bd898864a7f8 (diff)
downloadruby-405c295a21ba83e032cd2cc5a86e1edf9ee14ff4.tar.gz
[ruby/reline] Use fdiv for keyseq_timeout msec to sec conversion
(https://github.com/ruby/reline/pull/583) https://github.com/ruby/reline/commit/a6504acd63
Diffstat (limited to 'lib/reline.rb')
-rw-r--r--lib/reline.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/reline.rb b/lib/reline.rb
index 52609e6aaf..3d1716c81b 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -433,8 +433,7 @@ module Reline
end
private def read_2nd_character_of_key_sequence(keyseq_timeout, buffer, c, block)
- succ_c = io_gate.getc(keyseq_timeout / 1000)
-
+ succ_c = io_gate.getc(keyseq_timeout.fdiv(1000))
if succ_c
case key_stroke.match_status(buffer.dup.push(succ_c))
when :unmatched
@@ -462,7 +461,7 @@ module Reline
end
private def read_escaped_key(keyseq_timeout, c, block)
- escaped_c = io_gate.getc(keyseq_timeout / 1000)
+ escaped_c = io_gate.getc(keyseq_timeout.fdiv(1000))
if escaped_c.nil?
block.([Reline::Key.new(c, c, false)])