diff options
author | bronzdoc <lsagastume1990@gmail.com> | 2020-07-28 22:15:09 -0600 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-07-31 21:07:19 +0900 |
commit | 00bdac18cffce3fb74aa596c828a09e7d52affcd (patch) | |
tree | caacb09ca7d02c5e821979bb9d1f099b0e98f2eb /lib/rubygems/specification.rb | |
parent | 985309ac38c212de327e419ad4a7bcf9e7b28267 (diff) |
[rubygems/rubygems] Warn on duplicate dependency in a specification
https://github.com/rubygems/rubygems/commit/af3e5f7883
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3379
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r-- | lib/rubygems/specification.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 5e326e081f..d3d6d9ca20 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -556,6 +556,10 @@ class Gem::Specification < Gem::BasicSpecification # spec.add_runtime_dependency 'example', '~> 1.1', '>= 1.1.4' def add_runtime_dependency(gem, *requirements) + if requirements.uniq.size != requirements.size + warn "WARNING: duplicate dependency #{requirements}" + end + add_dependency_with_type(gem, :runtime, requirements) end |