Skip to content

Commit ae044e5

Browse files
committed
fix #149
1 parent 86cf4d1 commit ae044e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/parallel/processor_count.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module ProcessorCount
2020
#
2121
def processor_count
2222
@processor_count ||= begin
23-
if defined?(Etc)
23+
if defined?(Etc) && Etc.respond_to?(:nprocessors)
2424
Etc.nprocessors
2525
else
2626
os_name = RbConfig::CONFIG["target_os"]

0 commit comments

Comments
 (0)