ruby-changes:57403
From: Kazuhiro <ko1@a...>
Date: Fri, 30 Aug 2019 12:51:20 +0900 (JST)
Subject: [ruby-changes:57403] Kazuhiro NISHIYAMA: b870ca5879 (master): Add guard as same as `==`
https://git.ruby-lang.org/ruby.git/commit/?id=b870ca5879 From b870ca58791e576f5dbb263f54ae433a7f6d65ee Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Fri, 30 Aug 2019 12:49:27 +0900 Subject: 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?' ``` diff --git a/lib/bundler/resolver/spec_group.rb b/lib/bundler/resolver/spec_group.rb index 119f63b..e5772ee 100644 --- a/lib/bundler/resolver/spec_group.rb +++ b/lib/bundler/resolver/spec_group.rb @@ -62,6 +62,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/resolver/spec_group.rb#L62 end def eql?(other) + return unless other.is_a?(SpecGroup) name.eql?(other.name) && version.eql?(other.version) && source.eql?(other.source) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/