Permalink
Browse files

- Remove Gem.loaded_path and uses

The test that this was added for got lost and upon restoring it found
that the existing logic handles the case properly.

Check out test_activate_via_require_respects_loaded_files in
test_require.rb
  • Loading branch information...
1 parent 2297005 commit c917125a141a9b7efe16e11029bdabe260af9be6 @evanphx evanphx committed Jun 12, 2011
Showing with 1 addition and 9 deletions.
  1. +0 −8 lib/rubygems.rb
  2. +1 −1 lib/rubygems/custom_require.rb
View
@@ -983,14 +983,6 @@ def self.suffix_pattern
@suffix_pattern ||= "{#{suffixes.join(',')}}"
end
- def self.loaded_path? path
- # TODO: ruby needs a feature to let us query what's loaded in 1.8 and 1.9
-
- re = /(^|\/)#{Regexp.escape path.to_s}#{Regexp.union(*Gem.suffixes)}$/
-
- $LOADED_FEATURES.find { |s| s =~ re }
- end
-
##
# Suffixes for require-able paths.
@@ -32,7 +32,7 @@ module Kernel
# that file has already been loaded is preserved.
def require path
- if Gem::Specification.unresolved_deps.empty? or Gem.loaded_path? path then
+ if Gem::Specification.unresolved_deps.empty? then
gem_original_require path
else
spec = Gem::Specification.find { |s|

0 comments on commit c917125

Please sign in to comment.