expect-pty 0.9.0 → 0.9.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: cda29c495d71214dc6221859210c40a13db4d55174c781936c2dae8eb811a20d
4
- data.tar.gz: ecf866f1209506006bb7a23d1ac8a5ed18cf031ba12303e930810619cb516003
3
+ metadata.gz: b56d5e855684574710a2b3de08554ff517979a5ad8a96ff455780f55b5313b4a
4
+ data.tar.gz: 7f9b80ed4cbe5b0bc98bee0b1400941cecbfefe4229c23fedd9837ce8550d393
5
5
  SHA512:
6
- metadata.gz: c61d1880a85a03a49457f28e8408b7db47c2e50e2abfa299d54b6e63ecf75d43fa07ead9bf4a868563dbdf02127dd07d6bfc39a81b2edaa91f3a920c93200682
7
- data.tar.gz: '04109bd835876fa8957db8791cd30883b185a01e10e3d57fa1bef0f074d05b3b81771e2715d1a8cb4e53018badbb0975d422a9aa247dd888898d6893603ee8ec'
6
+ metadata.gz: ff9e7769c5ecfd1b4d6df2e6405b37acb9c8bcf5edbc5b0fbeea570bd50c774b1020a53d4593fb344efdd2404b8de0cce03f14c503011ab8079ac1649e4234be
7
+ data.tar.gz: 40d52a9b7388f2c740842b3c6abcd4c1d04787b4cf1c1ed20d7e855113e9d333330820f1404475a91698f9870426da2d85aeece9b728ed989b4628d3ef00b965
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.9.1 - 2026-10-18
6
+
7
+ - 修复自定义 Numeric 转换失败时泄漏常规异常的问题;时间参数统一抛出 ArgumentError 并保留 cause,Interrupt/SystemExit 仍原样传播。
8
+
5
9
  ## 0.9.0 - 2026-10-18
6
10
 
7
11
  - **不兼容**:命令默认直接按 argv 执行,单字符串也只作为可执行文件名,需要 shell 语法时须显式传入 `shell: true`。
data/lib/expect/pty.rb CHANGED
@@ -170,12 +170,15 @@ module Expect
170
170
  def numeric_seconds(value)
171
171
  raise ArgumentError, "seconds must be a real Numeric" unless value.is_a?(Numeric) && !value.is_a?(Complex)
172
172
 
173
- number = Float(value)
173
+ number = begin
174
+ Float(value)
175
+ rescue StandardError
176
+ # Numeric 子类也可自定义转换;只归一化转换失败,保留致命中断和原始 cause。
177
+ raise ArgumentError, "seconds must be a finite real Numeric"
178
+ end
174
179
  raise ArgumentError, "seconds must be finite" unless number.finite?
175
180
 
176
181
  number
177
- rescue TypeError, RangeError
178
- raise ArgumentError, "seconds must be a finite real Numeric"
179
182
  end
180
183
 
181
184
  # 按对象身份归属就绪描述符,不能用 IO 的值相等规则合并来源。
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Expect
4
4
  # Gem 与库共用的版本号;独立文件使 gemspec 无需加载完整会话实现。
5
- VERSION = "0.9.0"
5
+ VERSION = "0.9.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expect-pty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - expect-pty contributors