Permalink
Browse files

load rails module only on version >= 3

  • Loading branch information...
1 parent dd63fb2 commit 047c5e6ff7fae292b36516f5a3895f2c047fe1df @igrigorik committed Aug 21, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/rack/speedtracer.rb
View
@@ -6,8 +6,10 @@
require 'rack/speedtracer/tracer'
# auto-instrument Rails 3 applications
-if defined? Rails && Rails::Version::Major >= 3
- # require 'rack/speedtracer/rails'
+if defined? Rails
+ if Rails::Version::Major >= 3
+ require 'rack/speedtracer/rails'
+ end
end
module Rack
@@ -16,4 +18,4 @@ def self.new(app, options = {}, &blk)
Context.new(app, options, &blk)
end
end
-end
+end

0 comments on commit 047c5e6

Please sign in to comment.