summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-30 12:49:27 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-08-30 12:49:27 +0900
commitb870ca58791e576f5dbb263f54ae433a7f6d65ee (patch)
tree7ec25d05dca700624536f96e7b9a3a6584708bba
parent896d9f967b535a6ecb9ff5d3c08f1a37bcb8d1f9 (diff)
Add guard as same as `==`
Try to fix failure at https://github.com/ruby/ruby/runs/207580232#step:10:382 ``` undefined method `name' for "Gemfile.lock":String /home/runner/work/ruby/ruby/lib/bundler/resolver/spec_group.rb:65:in `eql?' ```
-rw-r--r--lib/bundler/resolver/spec_group.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler/resolver/spec_group.rb b/lib/bundler/resolver/spec_group.rb
index 119f63b5c8..e5772eed81 100644
--- a/lib/bundler/resolver/spec_group.rb
+++ b/lib/bundler/resolver/spec_group.rb
@@ -62,6 +62,7 @@ module Bundler
end
def eql?(other)
+ return unless other.is_a?(SpecGroup)
name.eql?(other.name) &&
version.eql?(other.version) &&
source.eql?(other.source)