Navigation Menu

Skip to content

Commit

Permalink
Use Regexp#=~
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 8, 2015
1 parent d52fdef commit b3091f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/windows/Vagrantfile
Expand Up @@ -8,9 +8,9 @@ def available_n_cpus
proc_file = "/proc/cpuinfo"
if File.exist?(proc_file)
File.readlines(proc_file).grep(/\Aprocessor\b/).size
elsif RUBY_PLATFORM =~ /darwin/
elsif /darwin/ =~ RUBY_PLATFORM
`sysctl -n hw.ncpu`.to_i
elsif RUBY_PLATFORM =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/
elsif /mswin|msys|mingw|cygwin|bccwin|wince|emc/ =~ RUBY_PLATFORM
`echo %NUMBER_OF_PROCESSORS%`.to_i
else
1
Expand Down

0 comments on commit b3091f3

Please sign in to comment.