Skip to content

Commit 425cfcf

Browse files
committed
[rubygems/rubygems] bin/rubocop -a --only Style/MultipleComparison
ruby/rubygems@677e17aa2e
1 parent cdbadaf commit 425cfcf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/bundler/checksum.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def initialize(type, location)
126126
end
127127

128128
def removable?
129-
type == :lock || type == :gem
129+
[:lock, :gem].include?(type)
130130
end
131131

132132
def ==(other)

lib/rubygems/local_remote_options.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ def both?
134134
# Is local fetching enabled?
135135

136136
def local?
137-
options[:domain] == :local || options[:domain] == :both
137+
[:local, :both].include?(options[:domain])
138138
end
139139

140140
##
141141
# Is remote fetching enabled?
142142

143143
def remote?
144-
options[:domain] == :remote || options[:domain] == :both
144+
[:remote, :both].include?(options[:domain])
145145
end
146146
end

spec/bundler/support/builders.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ def _build(opts)
632632
destination = opts[:path] || _default_path
633633
FileUtils.mkdir_p(lib_path.join(destination))
634634

635-
if opts[:gemspec] == :yaml || opts[:gemspec] == false
635+
if [:yaml, false].include?(opts[:gemspec])
636636
Dir.chdir(lib_path) do
637637
Bundler.rubygems.build(@spec, opts[:skip_validation])
638638
end

0 commit comments

Comments
 (0)