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