Skip to content

Commit

Permalink
load bundled version of tilt over installed version if < 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Mar 4, 2010
1 parent 95e7e88 commit 3e9f46d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
# require tilt if available; fall back on bundled version.
begin
require 'tilt'
if Tilt::VERSION < '0.7'
warn "WARN: sinatra requires tilt >= 0.7; you have #{Tilt::VERSION}. " +
"loading bundled version..."
Object.send :remove_const, :Tilt
raise LoadError
end
rescue LoadError
require 'sinatra/tilt'
end
Expand Down

0 comments on commit 3e9f46d

Please sign in to comment.