summaryrefslogtreecommitdiff
path: root/lib/rake/rake_module.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-15 03:07:37 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-15 03:07:37 +0000
commit6361928083d01906ab9d8782b6533b4ed7c834a0 (patch)
tree172488be8a74c9313d35b9cd7d53999cd55f561d /lib/rake/rake_module.rb
parent031e1570b934d6b3a1e17ae8eb78a44dac8186d3 (diff)
* lib/rake.rb, lib/rake/*.rb: Upgrade to rake-10.3.2
[fix GH-668] * test/rake/*.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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