diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-09 23:21:36 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-09 23:21:36 +0000 |
commit | 47f0248b0858898dd24d1e654cedf174059ca677 (patch) | |
tree | 493e84160f8609db408d88349f0624a3ff92c3c2 /lib/rubygems/dependency.rb | |
parent | cd9f9e471977447a991ced4ea38efb2309459ef5 (diff) | |
download | ruby-47f0248b0858898dd24d1e654cedf174059ca677.tar.gz |
* lib/rubygems: Import RubyGems 2.1
* test/rubygems: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/dependency.rb')
-rw-r--r-- | lib/rubygems/dependency.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rubygems/dependency.rb b/lib/rubygems/dependency.rb index 1e3cc168a8..a96d67c3e5 100644 --- a/lib/rubygems/dependency.rb +++ b/lib/rubygems/dependency.rb @@ -203,6 +203,8 @@ class Gem::Dependency requirement.satisfied_by? version end + alias === =~ + # DOC: this method needs either documented or :nodoc'd def match? obj, version=nil @@ -250,10 +252,10 @@ class Gem::Dependency # DOC: this method needs either documented or :nodoc'd def matching_specs platform_only = false - matches = Gem::Specification.find_all { |spec| + matches = Gem::Specification.stubs.find_all { |spec| self.name === spec.name and # TODO: == instead of === requirement.satisfied_by? spec.version - } + }.map(&:to_spec) if platform_only matches.reject! { |spec| |