We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86cf4d1 commit ae044e5Copy full SHA for ae044e5
1 file changed
lib/parallel/processor_count.rb
@@ -20,7 +20,7 @@ module ProcessorCount
20
#
21
def processor_count
22
@processor_count ||= begin
23
- if defined?(Etc)
+ if defined?(Etc) && Etc.respond_to?(:nprocessors)
24
Etc.nprocessors
25
else
26
os_name = RbConfig::CONFIG["target_os"]
0 commit comments