Permalink
Browse files

cherry picked 24b28a2 for 3-0-stable. Original Author: amatsuda

  • Loading branch information...
vijaydev committed Jun 6, 2011
1 parent 91bdd36 commit 81b01b75be3311cf81ac245b1ca4bffe5b98bd42
View
@@ -2,7 +2,11 @@ gem 'rdoc', '>= 2.5.10'
require 'rdoc'
require 'rake'
-require 'rdoc/task'
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rake/rdoctask'
+end
$:.unshift File.expand_path('..', __FILE__)
require "tasks/release"
@@ -1,4 +1,8 @@
-require 'rdoc/task'
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rake/rdoctask'
+end
# Monkey-patch to remove redoc'ing and clobber descriptions to cut down on rake -T noise
class RDocTaskWithoutDescriptions < RDoc::Task
@@ -85,7 +85,12 @@ class MyTie < Rails::Railtie
assert !$ran_block
require 'rake'
require 'rake/testtask'
- require 'rdoc/task'
+ begin
+ require 'rdoc/task'
+ rescue LoadError
+ require 'rake/rdoctask'
+ end
+
AppTemplate::Application.load_tasks
assert $ran_block
@@ -170,7 +170,11 @@ def test_rake_tasks_lib_tasks_are_loaded
boot_rails
require 'rake'
- require 'rdoc/task'
+ begin
+ require 'rdoc/task'
+ rescue LoadError
+ require 'rake/rdoctask'
+ end
require 'rake/testtask'
Rails.application.load_tasks
Rake::Task[:foo].invoke

0 comments on commit 81b01b7

Please sign in to comment.