diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-04-09 10:32:30 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-04-09 12:18:33 +0900 |
| commit | f4b5566d0976f55b1fda8cea943283901a3fdc72 (patch) | |
| tree | ddc7aeb0abd3c50ce54f954a24b0814e479dfa67 | |
| parent | aaa27ee05754b0358ad3f1c7c5b3d56d626cc497 (diff) | |
mkmf: grep all occurrences in cpp output
Apple clang aborts if cpp output is closed in middle, and leaves the
preprocessed source and reproduction shell script.
| -rw-r--r-- | lib/mkmf.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 5f7a7d352a..39ba4030cc 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -931,11 +931,9 @@ SRC xpopen(cpp_command('', opt)) do |f| if Regexp === pat puts(" ruby -ne 'print if #{pat.inspect}'") - f.grep(pat) {|l| + !f.grep(pat) {|l| puts "#{f.lineno}: #{l}" - return true - } - false + }.empty? else puts(" egrep '#{pat}'") system("egrep", pat, in: f) |
