io-console 0.8.1-java → 0.8.2-java

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: de613ec0c1ffad14d467b11af8fa9385739d845facb0ca0d89db50916c7e0e53
4
- data.tar.gz: ff3e00dd0982e1bd8c4200a8170b6db4539d641bde594a9899e04ba2fe1cd17f
3
+ metadata.gz: b840d62f5d17d3a367f0a978c107b39ecb08c59ca9a81d9bc9faf88041fbb909
4
+ data.tar.gz: 8c4dc753789ff1a4c6e2b5b5d1c55e6d5c1d59e9fffe308fd824578c6ec30a0b
5
5
  SHA512:
6
- metadata.gz: 9be0848a8032c2c0c8c1906736a77e035eee59af5f67dfb8a945f827931eb80484905c0483a67347eaa1e4f48bcd941c08a2221703828cfe9e155eb33c3f4681
7
- data.tar.gz: 4542675a40547791bf2bbaeda2482cb71866b125536f417308591f809111c5612ff4bc3379e4449ac82940522a7ff564f699fae6fe52f55691dd377a82496fea
6
+ metadata.gz: a2311dbec33c917c4033c6f1cad2e45e56c0d1e34b88ef5897d1d0e8e14003a9f4db6d15e0ffd24cd1e2ac3661a482729821f03e2c0a768bb9a67cd8276a18f5
7
+ data.tar.gz: '0398f065e2c7de6be4c33291c3ea050622de33cb01364b0b7443a89c3aed0afd3ff6e13f615174ae1a6803fb9b3280c6288d7b615ee2a7e929224684105bf33c'
@@ -1,3 +1,3 @@
1
1
  class IO::ConsoleMode
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
@@ -24,45 +24,51 @@ require 'rbconfig'
24
24
  require_relative 'console/version'
25
25
  require_relative 'console/common'
26
26
 
27
- # If Windows, always use the stub version
28
- if RbConfig::CONFIG['host_os'] =~ /(mswin)|(win32)|(ming)/
29
- require_relative 'console/stub_console'
30
- else
31
-
27
+ case RbConfig::CONFIG['host_os']
28
+ when /darwin|openbsd|freebsd|netbsd|linux/i
32
29
  # If Linux or BSD, try to load the native version
33
- if RbConfig::CONFIG['host_os'].downcase =~ /darwin|openbsd|freebsd|netbsd|linux/
34
- begin
35
30
 
36
- # Attempt to load the native Linux and BSD console logic
37
- require_relative 'console/native_console'
38
- ready = true
31
+ begin
32
+
33
+ # Attempt to load the native Linux and BSD console logic
34
+ require_relative 'console/native_console'
35
+
36
+ rescue Exception => ex
39
37
 
40
- rescue Exception => ex
38
+ warn "failed to load native console support: #{ex}" if $VERBOSE
41
39
 
42
- warn "failed to load native console support: #{ex}" if $VERBOSE
43
- ready = false
40
+ else
41
+
42
+ # Native ready.
43
+ ready = true
44
44
 
45
- end
46
45
  end
47
46
 
48
- # Native failed, try to use stty
49
- if !ready
50
- begin
47
+ when /mswin|win32|ming/i
48
+ # If Windows, stty is not possible, always use the stub version
49
+
50
+ ready = false
51
51
 
52
- require_relative 'console/stty_console'
53
- ready = true
52
+ end
54
53
 
55
- rescue Exception => ex2
54
+ if ready.nil?
55
+ # Native is not ready, try to use stty
56
56
 
57
- warn "failed to load stty console support: #{ex2}" if $VERBOSE
58
- ready = false
57
+ begin
58
+
59
+ require_relative 'console/stty_console'
60
+ ready = true
61
+
62
+ rescue Exception => ex2
63
+
64
+ warn "failed to load stty console support: #{ex2}" if $VERBOSE
65
+ ready = false
59
66
 
60
- end
61
67
  end
68
+ end
62
69
 
70
+ unless ready
63
71
  # If still not ready, just use stubbed version
64
- if !ready
65
- require_relative 'console/stub_console'
66
- end
67
72
 
73
+ require_relative 'console/stub_console'
68
74
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: io-console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: java
6
6
  authors:
7
7
  - Nobu Nakada
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-15 00:00:00.000000000 Z
10
+ date: 2025-12-14 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: add console capabilities to IO instances.
13
13
  email: nobu@ruby-lang.org