Skip to content

Commit

Permalink
Don't need try_activate without QuickLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Jan 2, 2011
1 parent fda095d commit 9ace627
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Rakefile
Expand Up @@ -2,17 +2,19 @@

$:.unshift 'lib'

Gem::QuickLoader.load_full_rubygems_library if defined?(Gem::QuickLoader)
if defined?(Gem::QuickLoader) then
Gem::QuickLoader.load_full_rubygems_library

class << Gem
remove_method :try_activate if Gem.respond_to?(:try_activate, true)
class << Gem
remove_method :try_activate if Gem.respond_to?(:try_activate, true)

def try_activate(path)
spec = Gem.searcher.find(path)
return false unless spec
def try_activate(path)
spec = Gem.searcher.find(path)
return false unless spec

Gem.activate(spec.name, "= #{spec.version}")
return true
Gem.activate(spec.name, "= #{spec.version}")
return true
end
end
end

Expand Down

0 comments on commit 9ace627

Please sign in to comment.