We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c721203 commit 508d9c0Copy full SHA for 508d9c0
lib/rubygems.rb
@@ -173,7 +173,12 @@ def self.try_activate path
173
# require will try to activate the more specific version.
174
175
spec = Gem::Specification.find_inactive_by_path path
176
- return false unless spec
+
177
+ unless spec
178
+ spec = Gem::Specification.find_by_path path
179
+ return true if spec && spec.activated?
180
+ return false
181
+ end
182
183
begin
184
spec.activate
0 commit comments