aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rake/rake_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rake/rake_module.rb')
-rw-r--r--lib/rake/rake_module.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/rake/rake_module.rb b/lib/rake/rake_module.rb
index fcf5800064..3692753434 100644
--- a/lib/rake/rake_module.rb
+++ b/lib/rake/rake_module.rb
@@ -2,8 +2,6 @@ require 'rake/application'
module Rake
- # Rake module singleton methods.
- #
class << self
# Current Rake Application
def application
@@ -15,6 +13,11 @@ module Rake
@application = app
end
+ def suggested_thread_count # :nodoc:
+ @cpu_count ||= Rake::CpuCounter.count
+ @cpu_count + 4
+ end
+
# Return the original directory where the Rake application was started.
def original_dir
application.original_dir
@@ -28,9 +31,7 @@ module Rake
# Add files to the rakelib list
def add_rakelib(*files)
application.options.rakelib ||= []
- files.each do |file|
- application.options.rakelib << file
- end
+ application.options.rakelib.concat(files)
end
end