From 425cfcff8579bfef64264ba2f644b717c5248b80 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 20 Feb 2025 15:54:13 +0900 Subject: [PATCH] [rubygems/rubygems] bin/rubocop -a --only Style/MultipleComparison https://github.com/rubygems/rubygems/commit/677e17aa2e --- lib/bundler/checksum.rb | 2 +- lib/rubygems/local_remote_options.rb | 4 ++-- spec/bundler/support/builders.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bundler/checksum.rb b/lib/bundler/checksum.rb index 60ba93417c..46befe5356 100644 --- a/lib/bundler/checksum.rb +++ b/lib/bundler/checksum.rb @@ -126,7 +126,7 @@ module Bundler end def removable? - type == :lock || type == :gem + [:lock, :gem].include?(type) end def ==(other) diff --git a/lib/rubygems/local_remote_options.rb b/lib/rubygems/local_remote_options.rb index 51a61213a5..3b88c43149 100644 --- a/lib/rubygems/local_remote_options.rb +++ b/lib/rubygems/local_remote_options.rb @@ -134,13 +134,13 @@ module Gem::LocalRemoteOptions # Is local fetching enabled? def local? - options[:domain] == :local || options[:domain] == :both + [:local, :both].include?(options[:domain]) end ## # Is remote fetching enabled? def remote? - options[:domain] == :remote || options[:domain] == :both + [:remote, :both].include?(options[:domain]) end end diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb index e375aeee33..ca2b7b7067 100644 --- a/spec/bundler/support/builders.rb +++ b/spec/bundler/support/builders.rb @@ -632,7 +632,7 @@ module Spec destination = opts[:path] || _default_path FileUtils.mkdir_p(lib_path.join(destination)) - if opts[:gemspec] == :yaml || opts[:gemspec] == false + if [:yaml, false].include?(opts[:gemspec]) Dir.chdir(lib_path) do Bundler.rubygems.build(@spec, opts[:skip_validation]) end