Skip to content

Commit 65c9266

Browse files
committed
Fix removing unexpected control chars
`cc` is created as `"\C-x"`, it is a String since ruby 1.9.
1 parent f8b33f3 commit 65c9266

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/io/console/test_io_console.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ def assert_ctrl(expect, cc, r, w)
373373
w.flush
374374
result = EnvUtil.timeout(3) {r.gets}
375375
if result
376-
case cc
377-
when 0..31
376+
case cc.chr
377+
when "\C-A".."\C-_"
378378
cc = "^" + (cc.ord | 0x40).chr
379-
when 127
379+
when "\C-?"
380380
cc = "^?"
381381
end
382382
result.sub!(cc, "")

0 commit comments

Comments
 (0)