Skip to content

Commit e66a969

Browse files
committed
Fix misuse of kwarg in IO#raw
- Obviously, `tim` is a typo for `time` - This didn't cause an exception because IO#raw is implemented in C and it doesn't check the keyword of the parameters - Though this typo doesn't produce any problems for now, I think it should be fixed just in case for the future - I've used this fixed version of Reline with IRB for several days and didn't find any new problems due to the fix - But I myself am not sure how to make sure this fix is completely robust
1 parent d00896a commit e66a969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/reline/ansi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def self.inner_getc
150150
until c = @@input.raw(intr: true) { @@input.wait_readable(0.1) && @@input.getbyte }
151151
Reline.core.line_editor.resize
152152
end
153-
(c == 0x16 && @@input.raw(min: 0, tim: 0, &:getbyte)) || c
153+
(c == 0x16 && @@input.raw(min: 0, time: 0, &:getbyte)) || c
154154
rescue Errno::EIO
155155
# Maybe the I/O has been closed.
156156
nil

0 commit comments

Comments
 (0)