summaryrefslogtreecommitdiff
path: root/lib/bundler/dep_proxy.rb
diff options
context:
space:
mode:
authorChristian Bruckmayer <cbruckmayer@suse.com>2018-08-22 09:25:40 +0200
committerChristian Bruckmayer <cbruckmayer@suse.com>2018-08-23 10:16:06 +0200
commitfd43f1135ccd239667ea03fb17fa6334610e9fbe (patch)
tree8891a059ac29e2c85a58a8a4ab2736a8f1ffc2e7 /lib/bundler/dep_proxy.rb
parent72f27b0dd8c92159bf769a531cfa97672bf4c1e4 (diff)
downloadbundler-fd43f1135ccd239667ea03fb17fa6334610e9fbe.tar.gz
Fix DepProxy#== undefind method error
DepProxy#== crashed with an undefind method error for anything other than a DepProxy class or nil as parameter. This was caused that it was assumed only DepProxy instances or nil can get passed as parameter. This commit implements checking the class as well and returns false if the classes are not the same. Fixes jruby/jruby#5280 travis-ci/travis-ci#9994
Diffstat (limited to 'lib/bundler/dep_proxy.rb')
-rw-r--r--lib/bundler/dep_proxy.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/dep_proxy.rb b/lib/bundler/dep_proxy.rb
index 7a9423b14a..77db9ebfb7 100644
--- a/lib/bundler/dep_proxy.rb
+++ b/lib/bundler/dep_proxy.rb
@@ -14,7 +14,7 @@ module Bundler
end
def ==(other)
- return if other.nil?
+ return false if other.class != self.class
dep == other.dep && __platform == other.__platform
end