Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'bovi-gem-duplication'

  • Loading branch information...
commit 7d134d941b37e0aaa8f6c6630583b091f70b8354 2 parents 8d33833 + d0f491d
@matz matz authored
Showing with 25 additions and 1 deletion.
  1. +24 −0 tasks/mrbgem_spec.rake
  2. +1 −1  tasks/mruby_build.rake
View
24 tasks/mrbgem_spec.rake
@@ -169,6 +169,30 @@ module MRuby
end
end # Specification
+
+ class List
+ include Enumerable
+
+ def initialize
+ @ary = []
+ end
+
+ def each(&b)
+ @ary.each(&b)
+ end
+
+ def <<(gem)
+ unless @ary.detect {|g| g.dir == gem.dir }
+ @ary << gem
+ else
+ # GEM was already added to this list
+ end
+ end
+
+ def empty?
+ @ary.empty?
+ end
+ end # List
end # Gem
GemBox = Object.new
View
2  tasks/mruby_build.rake
@@ -75,7 +75,7 @@ module MRuby
@mrbc = Command::Mrbc.new(self)
@bins = %w(mrbc)
- @gems, @libmruby = [], []
+ @gems, @libmruby = MRuby::Gem::List.new, []
@build_mrbtest_lib_only = false
MRuby.targets[@name] = self
Please sign in to comment.
Something went wrong with that request. Please try again.