Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't return duplicate gemset names

  • Loading branch information...
commit 80e3df1084ed5435224a74b8793f8808e033da67 1 parent 11fdcaf
@winton authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 lib/gem_template/gems.rb
View
11 lib/gem_template/gems.rb
@@ -84,10 +84,13 @@ def gemset=(gemset)
end
def gemset_names
- [ :default, :solo ] + @gemsets[gemspec.name.to_sym].inject([]) { |array, (key, value)|
- array.push(key) if value.is_a?(::Hash)
- array
- }
+ (
+ [ :default, :solo ] +
+ @gemsets[gemspec.name.to_sym].inject([]) { |array, (key, value)|
+ array.push(key) if value.is_a?(::Hash)
+ array
+ }
+ ).uniq
end
def gemspec(reload=false)
Please sign in to comment.
Something went wrong with that request. Please try again.