Skip to content
Browse files

Fixes a LoadError on 1.8.7 while still squashing deprecation warnings…

… on newer Rubies
  • Loading branch information...
1 parent 2e3f45c commit c290d353807a23d45d3b07ab4b8cd2b4e12eb682 @alindeman alindeman committed Jan 28, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 sunspot_rails/Rakefile
View
7 sunspot_rails/Rakefile
@@ -1,5 +1,10 @@
require 'rake'
-require 'rdoc/task'
+
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rake/rdoctask'
+end
if File.exist?(sunspot_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'sunspot', 'lib')))
STDERR.puts("Using sunspot lib at #{sunspot_lib}")

0 comments on commit c290d35

Please sign in to comment.
Something went wrong with that request. Please try again.