summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Sasse <esasse@gmail.com>2015-07-18 01:25:39 -0300
committerErick Sasse <esasse@gmail.com>2015-07-19 11:51:55 -0300
commit3760c0a8854ac9f52004249d94fb94e9cce5b815 (patch)
tree0aaeb0e95f60e02494f6522c6fbc778c7e3408e2
parent05cbfbad2ac487712b2a4e0d5f74624e12c4b050 (diff)
downloadbundler-3760c0a8854ac9f52004249d94fb94e9cce5b815.tar.gz
Fix Style/SelfAssignment
-rw-r--r--.rubocop_todo.yml5
-rw-r--r--lib/bundler/definition.rb4
-rw-r--r--lib/bundler/fetcher.rb2
3 files changed, 3 insertions, 8 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 446a2846e0..e1ac3b73b2 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -389,11 +389,6 @@ Style/RegexpLiteral:
Style/RescueModifier:
Enabled: false
-# Offense count: 3
-# Cop supports --auto-correct.
-Style/SelfAssignment:
- Enabled: false
-
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 981fe95512..679dc3e004 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -488,14 +488,14 @@ module Bundler
if !locked_gem_sources.empty? && !actual_remotes.empty?
locked_gem_sources.each do |locked_gem|
# Merge the remotes from the Gemfile into the Gemfile.lock
- changes = changes | locked_gem.replace_remotes(actual_remotes)
+ changes |= locked_gem.replace_remotes(actual_remotes)
end
end
# Replace the sources from the Gemfile with the sources from the Gemfile.lock,
# if they exist in the Gemfile.lock and are `==`. If you can't find an equivalent
# source in the Gemfile.lock, use the one from the Gemfile.
- changes = changes | sources.replace_sources!(@locked_sources)
+ changes |= sources.replace_sources!(@locked_sources)
sources.all_sources.each do |source|
# If the source is unlockable and the current command allows an unlock of
diff --git a/lib/bundler/fetcher.rb b/lib/bundler/fetcher.rb
index 7391c2884d..4540d3e7e1 100644
--- a/lib/bundler/fetcher.rb
+++ b/lib/bundler/fetcher.rb
@@ -75,7 +75,7 @@ module Bundler
# fetch a gem specification
def fetch_spec(spec)
- spec = spec - [nil, "ruby", ""]
+ spec -= [nil, "ruby", ""]
spec_file_name = "#{spec.join "-"}.gemspec"
uri = URI.parse("#{remote_uri}#{Gem::MARSHAL_SPEC_DIR}#{spec_file_name}.rz")