celluloid/celluloid — pull request #364 by p-originate (2013-12-12 23:04:03+00:00)
Title: Guard against CPUCounter.cores being nil, add a test

PoolManager compares CPUCounter.cores with an integer but cores may be nil, producing an error like this:

/home/me/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:13:in `each': comparison of Fixnum with nil failed (ArgumentError)

Either cores should always be set to a number, or pool manager should handle cores being nil.

This PR implements the second option.

It also adds a test for cores being not nil on the current system. This way if someone runs the test suite on a system that has no implementation of cores, they would at least know that much.