rcurses 6.2.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83520fbe28d15e3132827b2487cf90c386bd94362bcd77561a6361bf34a155fc
4
- data.tar.gz: 22be19a0d1625c0e264372dbfa9fd9031016400a3859119158a783a620e3c412
3
+ metadata.gz: b13d24016c4f50d3be32d0a0bbfa4fb4d8c91f56495685a49092ee8e6e4f911a
4
+ data.tar.gz: 4199b5be43510913de44129abe16408a26c07e4e2188113f5952dd0bbcb58a22
5
5
  SHA512:
6
- metadata.gz: 523564a95aaf527d1df0f03056d6f2776f66e5d2aacb7bf70f81381d1f7cee5fc2f575cb6196126dcf990d6fde4db11d357f60dfb85112ef3f1e8fee038e9bee
7
- data.tar.gz: 670f44738dab604557da61576ec048634efbef7d3a6adbac84bba5ace294fe2a246c7c25a438798e70012a45ab4263a311ee6abb8026943be9b4e746c068ce4a
6
+ metadata.gz: 84de15bb7f6ed01c1b95e7e548d8e452e120d15296ff64bc7118ba1a02d0298086d2cc1fc1ceb7dfcdc691eeac55e654e2d2fe0992e36d25dc57404c770d06ff
7
+ data.tar.gz: c77412cda9fb4a998d2a369e8021566e9a341f433c38195cc8dc70e00aabc500cb5cda6caf69bc80670111eb71bbf49e7cf618a7ed2d2591798a3ead31ed6860
data/lib/rcurses/input.rb CHANGED
@@ -3,17 +3,16 @@ module Rcurses
3
3
  def getchr(t = nil, flush: true)
4
4
  begin
5
5
  # 1) Read a byte (with optional timeout)
6
- begin
7
- c = t ? Timeout.timeout(t) { $stdin.getch } : $stdin.getch
8
- rescue Timeout::Error
9
- return nil
6
+ if t
7
+ return nil unless IO.select([$stdin], nil, nil, t)
10
8
  end
9
+ c = $stdin.getch
11
10
 
12
11
 
13
12
  # 2) If it's ESC, grab any quick trailing bytes
14
13
  seq = c
15
14
  if c == "\e"
16
- if IO.select([$stdin], nil, nil, 0.15)
15
+ if IO.select([$stdin], nil, nil, 0.05)
17
16
  begin
18
17
  seq << $stdin.read_nonblock(16)
19
18
  rescue IO::WaitReadable, EOFError
data/lib/rcurses.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  # Web_site: http://isene.com/
6
6
  # Github: https://github.com/isene/rcurses
7
7
  # License: Public domain
8
- # Version: 6.2.0: Popup widget, emoji picker, pane color cache, stdin flush
8
+ # Version: 6.2.1: Replace Timeout with IO.select in getchr, revert ESC timeout
9
9
 
10
10
  require 'io/console' # Basic gem for rcurses
11
11
  require 'io/wait' # stdin handling
@@ -176,7 +176,7 @@ module Rcurses
176
176
  f.puts "Program: #{$0}"
177
177
  f.puts "Working Directory: #{Dir.pwd}"
178
178
  f.puts "Ruby Version: #{RUBY_VERSION}"
179
- f.puts "Rcurses Version: 6.2.0"
179
+ f.puts "Rcurses Version: 6.2.1"
180
180
  f.puts "=" * 60
181
181
  f.puts "Error Class: #{error.class}"
182
182
  f.puts "Error Message: #{error.message}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcurses
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene