diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-21 10:59:45 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-29 10:43:09 +0900 |
| commit | 41d5df03edcd30c13afd5f67497dd08835060a3a (patch) | |
| tree | 7fff8014255640e393c62ac98373616e3c75b9cb /lib | |
| parent | 32ffd810118f368aa651a58b53e38b675105dab9 (diff) | |
| download | mruby-41d5df03edcd30c13afd5f67497dd08835060a3a.tar.gz mruby-41d5df03edcd30c13afd5f67497dd08835060a3a.zip | |
Use `Dir.glob` instead of `map`.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mruby/build/load_gems.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/mruby/build/load_gems.rb b/lib/mruby/build/load_gems.rb index 4f5bde7af..753476b01 100644 --- a/lib/mruby/build/load_gems.rb +++ b/lib/mruby/build/load_gems.rb @@ -35,9 +35,7 @@ module MRuby current.build_config_initializer = block gems << current - cxx_srcs = ['src', 'test', 'tools'].map do |subdir| - Dir.glob("#{current.dir}/#{subdir}/*.{cpp,cxx,cc}") - end.flatten + cxx_srcs = Dir.glob("#{current.dir}/{src,test,tools}/*.{cpp,cxx,cc}") enable_cxx_exception unless cxx_srcs.empty? current |
