[Groonga-commit] ranguba/rroonga at 6780114 [master] Simplify

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Oct 29 00:08:59 JST 2014


Kouhei Sutou	2014-10-29 00:08:59 +0900 (Wed, 29 Oct 2014)

  New Revision: 6780114536d4c3c99fbd7dae849404043a96a206
  https://github.com/ranguba/rroonga/commit/6780114536d4c3c99fbd7dae849404043a96a206

  Message:
    Simplify

  Modified files:
    ext/groonga/extconf.rb

  Modified: ext/groonga/extconf.rb (+4 -5)
===================================================================
--- ext/groonga/extconf.rb    2014-10-29 00:07:58 +0900 (4b60eb3)
+++ ext/groonga/extconf.rb    2014-10-29 00:08:59 +0900 (323eef8)
@@ -169,14 +169,13 @@ end
 
 def n_processors
   proc_file = "/proc/cpuinfo"
-  use_processors = 1
   if File.exist?(proc_file)
-    n_cpus = File.readlines(proc_file).grep(/^processor/).size
+    File.readlines(proc_file).grep(/^processor/).size
   elsif /darwin/ =~ RUBY_PLATFORM
-    n_cpus = `sysctl -n hw.ncpu`
+    `sysctl -n hw.ncpu`.to_i
+  else
+    1
   end
-  use_processors = n_cpus.to_i
-  use_processors
 end
 
 def install_for_gnu_build_system(install_dir)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index