Permalink
Browse files

prevent duplicate sources

  • Loading branch information...
1 parent 5245b34 commit 047444cf3b841a9aef0696565781fe0bf1b38c1d @geemus geemus committed Mar 6, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/bundler/dsl.rb
View
@@ -104,7 +104,11 @@ def source(source, options = {})
return
else
@source = source
- options[:prepend] ? @sources.unshift(@source) : @sources << @source
+ if options[:prepend]
+ @sources = [@source] | @sources
+ else
+ @sources = @sources | [@source]
+ end
yield if block_given?
return @source

0 comments on commit 047444c

Please sign in to comment.