diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-27 22:08:25 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-27 22:08:25 +0900 |
| commit | 6d07d9b3d7a64834bda8644ab6c4ed1fabe217a4 (patch) | |
| tree | 56db41cf80ef6488933744889c5ecc74a06dfad8 | |
| parent | 6059834244a53241ce6591cd6248497b0c495563 (diff) | |
| parent | cb7eb202cef2ee72e0b6f2909ea083002bf497c3 (diff) | |
| download | mruby-6d07d9b3d7a64834bda8644ab6c4ed1fabe217a4.tar.gz mruby-6d07d9b3d7a64834bda8644ab6c4ed1fabe217a4.zip | |
Merge pull request #5197 from shuujii/fix-incorrect-regexp-creation-in-tasks-presym.rake
Fix incorrect regexp creation in `tasks/presym.rake`
| -rw-r--r-- | tasks/presym.rake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tasks/presym.rake b/tasks/presym.rake index 949bc3ac1..1d6ef490e 100644 --- a/tasks/presym.rake +++ b/tasks/presym.rake @@ -61,8 +61,8 @@ MRuby.each_target do |build| end file presym_file => [*cfiles, *rbfiles, *psfiles, __FILE__] do - prefix_re = Regexp.union(*macro_to_symbol.keys.uniq.map(&:first)) - suffix_re = Regexp.union(*macro_to_symbol.keys.uniq.map(&:last)) + prefix_re = Regexp.union(*macro_to_symbol.keys.map(&:first).uniq) + suffix_re = Regexp.union(*macro_to_symbol.keys.map(&:last).uniq) macro_re = /MRB_(#{prefix_re})SYM(#{suffix_re})\((\w+)\)/o csymbols = cfiles.map do |f| src = File.read(f) @@ -116,8 +116,8 @@ MRuby.each_target do |build| presyms = File.readlines(presym_file) presyms.each{|x| x.chomp!} symbol_to_macro = macro_to_symbol.invert - prefix_re = Regexp.union(*symbol_to_macro.keys.uniq.map(&:first)) - suffix_re = Regexp.union(*symbol_to_macro.keys.uniq.map(&:last)) + prefix_re = Regexp.union(*symbol_to_macro.keys.map(&:first).uniq) + suffix_re = Regexp.union(*symbol_to_macro.keys.map(&:last).uniq) macro_re = /\A(#{prefix_re})?([\w&&\D]\w*)(#{suffix_re})?\z/o mkdir_p(File.dirname(presym_inc)) _pp "GEN", presym_inc.relative_path |
