lib/celluloid/internals/cpu_counter.rb in celluloid-essentials-0.20.2.1 vs lib/celluloid/internals/cpu_counter.rb in celluloid-essentials-0.20.5
- old
+ new
@@ -33,15 +33,15 @@
Java::Java.lang.Runtime.getRuntime.availableProcessors if defined? Java::Java
rescue
end
def from_proc
- File.read('/proc/cpuinfo').scan(/^processor\s*:/).size if File.exist?('/proc/cpuinfo')
+ File.read("/proc/cpuinfo").scan(/^processor\s*:/).size if File.exist?("/proc/cpuinfo")
rescue
end
def from_win32ole
- require 'win32ole'
+ require "win32ole"
WIN32OLE.connect("winmgmts://").ExecQuery("select * from Win32_ComputerSystem").NumberOfProcessors
rescue LoadError
rescue
end