Require NUMBER_OF_PROCESSORS in test_nprocessors

A missing variable turned the lower bound into 0, which the existing assertion already covers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Hiroshi SHIBATAandClaude Fable 5.1 committed 2026-09-27 13:03:36 +09:00
1 parent 17af2a8397
commit 41349bb1e8
1 file changed
+1 -1
Notes: git 2026-09-27 04:04:09 +00:00
+1 -1
View File
@@ -168,7 +168,7 @@ class TestEtc < Test::Unit::TestCase
n = Etc.nprocessors
assert_operator(1, :<=, n)
if /mswin|mingw/ =~ RUBY_PLATFORM
assert_operator(ENV["NUMBER_OF_PROCESSORS"].to_i, :<=, n)
assert_operator(Integer(ENV.fetch("NUMBER_OF_PROCESSORS")), :<=, n)
end
end