Skip to content
This repository
Browse code

prevent duplicate sources

  • Loading branch information...
commit 047444cf3b841a9aef0696565781fe0bf1b38c1d 1 parent 5245b34
Wesley Beary authored March 06, 2012

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  lib/bundler/dsl.rb
6  lib/bundler/dsl.rb
@@ -104,7 +104,11 @@ def source(source, options = {})
104 104
         return
105 105
       else
106 106
         @source = source
107  
-        options[:prepend] ? @sources.unshift(@source) : @sources << @source
  107
+        if options[:prepend]
  108
+          @sources = [@source] | @sources
  109
+        else
  110
+          @sources = @sources | [@source]
  111
+        end
108 112
 
109 113
         yield if block_given?
110 114
         return @source

0 notes on commit 047444c

Please sign in to comment.
Something went wrong with that request. Please try again.