aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xRakefile7
-rwxr-xr-xrailties/lib/rails/generators/rails/plugin_new/templates/Rakefile2
-rw-r--r--railties/lib/rails/tasks/documentation.rake2
-rw-r--r--railties/test/railties/railtie_test.rb7
-rw-r--r--railties/test/railties/shared_tests.rb6
5 files changed, 7 insertions, 17 deletions
diff --git a/Rakefile b/Rakefile
index 70276fea78..92b2e77963 100755
--- a/Rakefile
+++ b/Rakefile
@@ -1,11 +1,6 @@
#!/usr/bin/env rake
-
-begin
- require 'rdoc/task'
-rescue LoadError
- require 'rake/rdoctask'
-end
+require 'rdoc/task'
require 'net/http'
$:.unshift File.expand_path('..', __FILE__)
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile
index 0e4c712acb..b28a842731 100755
--- a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile
+++ b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile
@@ -7,7 +7,9 @@ end
begin
require 'rdoc/task'
rescue LoadError
+ require 'rdoc/rdoc'
require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
end
RDoc::Task.new(:rdoc) do |rdoc|
diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake
index 59305322b7..79255d1f56 100644
--- a/railties/lib/rails/tasks/documentation.rake
+++ b/railties/lib/rails/tasks/documentation.rake
@@ -1,7 +1,9 @@
begin
require 'rdoc/task'
rescue LoadError
+ require 'rdoc/rdoc'
require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
end
# Monkey-patch to remove redoc'ing and clobber descriptions to cut down on rake -T noise
diff --git a/railties/test/railties/railtie_test.rb b/railties/test/railties/railtie_test.rb
index 4b94942e1f..18fdf59fe3 100644
--- a/railties/test/railties/railtie_test.rb
+++ b/railties/test/railties/railtie_test.rb
@@ -97,12 +97,7 @@ module RailtiesTest
assert !$ran_block
require 'rake'
require 'rake/testtask'
- begin
- require 'rdoc/task'
- rescue LoadError
- require 'rake/rdoctask'
- end
-
+ require 'rdoc/task'
AppTemplate::Application.load_tasks
assert $ran_block
diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb
index fdeddcf659..659551d08a 100644
--- a/railties/test/railties/shared_tests.rb
+++ b/railties/test/railties/shared_tests.rb
@@ -237,11 +237,7 @@ module RailtiesTest
boot_rails
require 'rake'
- begin
- require 'rdoc/task'
- rescue LoadError
- require 'rake/rdoctask'
- end
+ require 'rdoc/task'
require 'rake/testtask'
Rails.application.load_tasks
Rake::Task[:foo].invoke