diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2015-11-26 12:34:13 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2015-11-26 12:34:13 -0600 |
commit | 69832acfd333267d1bedc6b2467e5c0f0c1c67e1 (patch) | |
tree | 8fd3fd34e7440bc266e7062d13601ce617f69438 /lib/bundler/dsl.rb | |
parent | 5782a9f536ba4440d74e4d4fcda25b26721982b3 (diff) | |
download | bundler-69832acfd333267d1bedc6b2467e5c0f0c1c67e1.tar.gz |
[RuboCop] Enable Style/Next
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r-- | lib/bundler/dsl.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index 70a1c899..772a0584 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -299,15 +299,14 @@ module Bundler end %w(git path).each do |type| - if param = opts[type] - if version.first && version.first =~ /^\s*=?\s*(\d[^\s]*)\s*$/ - options = opts.merge("name" => name, "version" => $1) - else - options = opts.dup - end - source = send(type, param, options) {} - opts["source"] = source + next unless param = opts[type] + if version.first && version.first =~ /^\s*=?\s*(\d[^\s]*)\s*$/ + options = opts.merge("name" => name, "version" => $1) + else + options = opts.dup end + source = send(type, param, options) {} + opts["source"] = source end opts["source"] ||= @source |