summaryrefslogtreecommitdiff
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 3622f7102d..2c8dbee2a2 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -8,7 +8,7 @@
require 'rbconfig'
module Gem
- VERSION = '2.0.3'
+ VERSION = '2.0.4'
end
# Must be first since it unloads the prelude from 1.9.2
@@ -173,7 +173,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 && spec.activated?
+ return false
+ end
begin
spec.activate