[#82706] [Ruby trunk Bug#13851] getting "can't modify string; temporarily locked" on non-frozen instances — cardoso_tiago@...
Issue #13851 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/07
[#82853] [Ruby trunk Bug#13916] Race condition when sending a signal to a new fork — russell.davis@...
Issue #13916 has been reported by russelldavis (Russell Davis).
3 messages
2017/09/19
[#82892] [Ruby trunk Bug#13921] buffered read_nonblock doesn't work as expected using SSLSocket — cardoso_tiago@...
Issue #13921 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/20
[ruby-core:82741] [Ruby trunk Bug#13888] Consistent error in IO::Console.winsize=
From:
jm.beauvais_3743@...
Date:
2017-09-10 23:33:44 UTC
List:
ruby-core #82741
Issue #13888 has been reported by jm_beauvais (Jean-Michel Beauvais).
----------------------------------------
Bug #13888: Consistent error in IO::Console.winsize=
https://bugs.ruby-lang.org/issues/13888
* Author: jm_beauvais (Jean-Michel Beauvais)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
When trying to change the console window size, an error is always thrown, but the column size gets changed if the new value is higher than old value.
This behaviour can be observed by running the following code :
~~~ ruby
require 'io/console'
rows, cols = IO::console.winsize
puts "START : r = #{rows}, c = #{cols}", '* INCREASE COLUMNS BY 1', nil
arr = rows, cols+1
# 4 args same error
#arr = rows, cols+1, 0, 0
begin
IO::console.winsize = arr
rescue Errno::EINVAL
puts 'Predicted error...', $!
end
rows, cols = IO::console.winsize
puts nil, " STEP : r = #{rows}, c = #{cols}", '* DECREASE COLUMNS BY 1', nil # Column size has increased even if an error was raised.
arr = rows, cols-1
#arr = rows, cols-1, 0, 0
begin
IO::console.winsize = arr
rescue Errno::EINVAL
puts 'Predicted error...', $!
end
rows, cols = IO::console.winsize
puts nil, " END : r = #{rows}, c = #{cols}" # Column size was not decreased.
gets
~~~
Which returns :
~~~
START : r = 25, c = 80
* INCREASE COLUMNS BY 1
Predicted error...
Invalid argument - SetConsoleWindowInfo
STEP : r = 25, c = 81
* DECREASE COLUMNS BY 1
Predicted error...
Invalid argument - SetConsoleWindowInfo
END : r = 25, c = 81
~~~
This was observed on a Windows 7 x64 computer (all important updates installed up to 2017-09-10).
--
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>