Commit 482b2ea0 authored by KOBAYASHI Shuji's avatar KOBAYASHI Shuji

Use `each_with_object` instead of `reduce`.

For fix Codacy issue.
parent ce5e4544
......@@ -336,7 +336,7 @@ module MRuby
end
def generate_gem_table build
gem_table = reduce({}) { |res,v| res[v.name] = v; res }
gem_table = each_with_object({}) { |spec, h| h[spec.name] = spec }
default_gems = {}
each do |g|
......@@ -430,7 +430,8 @@ module MRuby
end
def import_include_paths(g)
gem_table = reduce({}) { |res,v| res[v.name] = v; res }
gem_table = each_with_object({}) { |spec, h| h[spec.name] = spec }
g.dependencies.each do |dep|
dep_g = gem_table[dep[:gem]]
# We can do recursive call safely
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment