diff options
author | Victor Koronen <koronen@kth.se> | 2015-08-08 16:31:37 +0200 |
---|---|---|
committer | Victor Koronen <koronen@kth.se> | 2015-08-14 12:29:43 +0200 |
commit | 1399023b14f684d2af7976416bd25fff689d0518 (patch) | |
tree | 70e08a9d12d2d2b0660927e68d1b967400d59bb8 | |
parent | e57b712070d7b247cd2d411697780e5660a38098 (diff) | |
download | bundler-1399023b14f684d2af7976416bd25fff689d0518.tar.gz |
Fix Style/OpMethod
-rw-r--r-- | .rubocop_todo.yml | 4 | ||||
-rw-r--r-- | lib/bundler/dep_proxy.rb | 4 | ||||
-rw-r--r-- | lib/bundler/index.rb | 4 | ||||
-rw-r--r-- | lib/bundler/source/git.rb | 7 | ||||
-rw-r--r-- | lib/bundler/source/path.rb | 8 | ||||
-rw-r--r-- | lib/bundler/source/rubygems.rb | 4 |
6 files changed, 14 insertions, 17 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d9facda0fe..36a68c7684 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -285,10 +285,6 @@ Style/NumericLiterals: Style/OneLineConditional: Enabled: false -# Offense count: 5 -Style/OpMethod: - Enabled: false - # Offense count: 63 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. diff --git a/lib/bundler/dep_proxy.rb b/lib/bundler/dep_proxy.rb index 378cefa194..4efd99c9bb 100644 --- a/lib/bundler/dep_proxy.rb +++ b/lib/bundler/dep_proxy.rb @@ -11,8 +11,8 @@ module Bundler @hash ||= dep.hash end - def ==(o) - dep == o.dep && __platform == o.__platform + def ==(other) + dep == other.dep && __platform == other.__platform end alias_method :eql?, :== diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb index 6c4ed3996c..17e7fbbd1b 100644 --- a/lib/bundler/index.rb +++ b/lib/bundler/index.rb @@ -127,9 +127,9 @@ module Bundler end end - def ==(o) + def ==(other) all? do |spec| - other_spec = o[spec].first + other_spec = other[spec].first (spec.dependencies & other_spec.dependencies).empty? && spec.source == other_spec.source end end diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 7c0abc5637..c18341d17e 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -49,9 +49,10 @@ module Bundler [self.class, uri, ref, branch, name, version, submodules].hash end - def eql?(o) - o.is_a?(Git) && uri == o.uri && ref == o.ref && branch == o.branch && name == o.name && version == o.version && - submodules == o.submodules + def eql?(other) + other.is_a?(Git) && uri == other.uri && ref == other.ref && + branch == other.branch && name == other.name && + version == other.version && submodules == other.submodules end alias_method :==, :eql? diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 1772a819c9..b2c2f8c978 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -56,10 +56,10 @@ module Bundler [self.class, expanded_path, version].hash end - def eql?(o) - o.instance_of?(Path) && - expanded_path == expand(o.path) && - version == o.version + def eql?(other) + other.instance_of?(Path) && + expanded_path == expand(other.path) && + version == other.version end alias_method :==, :eql? diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index a9b10f5936..a51813b4f9 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -37,8 +37,8 @@ module Bundler @remotes.hash end - def eql?(o) - o.is_a?(Rubygems) && o.credless_remotes == credless_remotes + def eql?(other) + other.is_a?(Rubygems) && other.credless_remotes == credless_remotes end alias_method :==, :eql? |