Created
July 3, 2013 23:53
-
-
Save evanphx/5923876 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/rubygems.rb b/lib/rubygems.rb | |
index ad2ec26..d468393 100644 | |
--- a/lib/rubygems.rb | |
+++ b/lib/rubygems.rb | |
@@ -181,7 +181,12 @@ module Gem | |
# require will try to activate the more specific version. | |
spec = Gem::Specification.find_inactive_by_path path | |
- return false unless spec | |
+ | |
+ unless spec | |
+ spec = Gem::Specification.find_by_path path | |
+ return true if spec.activated? | |
+ false | |
+ end | |
begin | |
spec.activate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment