[#86520] [Ruby trunk Bug#14681] `syswrite': stream closed in another thread (IOError) — samuel@...
Issue #14681 has been reported by ioquatix (Samuel Williams).
3 messages
2018/04/12
[#86755] [Ruby trunk Feature#14723] [WIP] sleepy GC — normalperson@...
Issue #14723 has been reported by normalperson (Eric Wong).
6 messages
2018/04/29
[ruby-core:86560] [Ruby trunk Bug#14691] ANSI Erase in Line not working properly in Windows
From:
algitt65@...
Date:
2018-04-17 15:06:47 UTC
List:
ruby-core #86560
Issue #14691 has been reported by rsranger65 (Alex Gittemeier).
----------------------------------------
Bug #14691: ANSI Erase in Line not working properly in Windows
https://bugs.ruby-lang.org/issues/14691
* Author: rsranger65 (Alex Gittemeier)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
When I run the following commands in either the Windows 10 Command Prompt
~~~
ruby -e 'puts "Hello world!\e[D\e[D\e[K\nWhat is up?"'
ruby -e 'puts "Hello world!\e[D\e[D\e[0K\nWhat is up?"'
ruby -e 'puts "Hello world!\e[D\e[D\e[1K\nWhat is up?"'
~~~
I expect to get the same output as from:
~~~
printf "Hello world!\\e[D\\e[D\\e[K\nWhats up?\n"
printf "Hello world!\\e[D\\e[D\\e[0K\nWhats up?\n"
printf "Hello world!\\e[D\\e[D\\e[1K\nWhats up?\n"
~~~
Which is:
~~~
Hello worl
Whats up?
Hello worl
Whats up?
!
Whats up?
~~~
But instead I get:
~~~
d!
What is up?
d!
What is up?
d!
What is up?
~~~
The same behavior occurs in PowerShell as well, with appropriate changes to escaping (escaping the double quotes in the ruby code).
It appears that for the `CSI [n] K` sequences, n=0 (the default) and n=1 are doing the same operation and that n=1 has an off by one error
Windows version: Version 10.0.16299 Build 16299
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>