Merge branch 'bovi-gem-duplication'

This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-05-04 01:23:41 +09:00
2 changed files with 25 additions and 1 deletions
+24
View File
@@ -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
+1 -1
View File
@@ -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