Skip to content

Loading…

no need to rescue when requiring 'rdoc/task' in Ruby >= 1.9 #5192

Merged
merged 1 commit into from

2 participants

@amatsuda
Ruby on Rails member

This commit reverts ugly workaround ( 24b28a2 ) against RDoc API change.
We no more need this workaround because require 'rdoc/task' will never fail in Ruby '>= 1.9.3'

@josevalim josevalim merged commit 4a631df into rails:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
9 railties/lib/rails/generators/rails/plugin_new/templates/Rakefile
@@ -4,13 +4,8 @@ begin
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
-begin
- require 'rdoc/task'
-rescue LoadError
- require 'rdoc/rdoc'
- require 'rake/rdoctask'
- RDoc::Task = Rake::RDocTask
-end
+
+require 'rdoc/task'
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
View
8 railties/lib/rails/tasks/documentation.rake
@@ -1,10 +1,4 @@
-begin
- require 'rdoc/task'
-rescue LoadError
- require 'rdoc/rdoc'
- require 'rake/rdoctask'
- RDoc::Task = Rake::RDocTask
-end
+require 'rdoc/task'
# Monkey-patch to remove redoc'ing and clobber descriptions to cut down on rake -T noise
class RDocTaskWithoutDescriptions < RDoc::Task
Something went wrong with that request. Please try again.