summaryrefslogtreecommitdiff
path: root/lib/bundler/dsl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r--lib/bundler/dsl.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 57be120d9f..8a3931e852 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -93,9 +93,8 @@ module Bundler
if current.requirement != dep.requirement
if current.type == :development
@dependencies.delete current
- elsif dep.type == :development
- return
else
+ return if dep.type == :development
raise GemfileError, "You cannot specify the same gem twice with different version requirements.\n" \
"You specified: #{current.name} (#{current.requirement}) and #{dep.name} (#{dep.requirement})"
end
@@ -109,9 +108,8 @@ module Bundler
if current.source != dep.source
if current.type == :development
@dependencies.delete current
- elsif dep.type == :development
- return
else
+ return if dep.type == :development
raise GemfileError, "You cannot specify the same gem twice coming from different sources.\n" \
"You specified that #{dep.name} (#{dep.requirement}) should come from " \
"#{current.source || "an unspecified source"} and #{dep.source}\n"