mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge branch 'bovi-gem-duplication'
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user