Avoid using chomp:true option to File.readlines.

The option is not available in the old version of Ruby.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-06-05 10:10:36 +09:00
parent 7ab7cadbbb
commit 26da07db15
+2 -1
View File
@@ -164,7 +164,8 @@ file presym_file => cfiles+rbfiles+[__FILE__] do
src.scan(/\bdef +(\w+)/)]
end
symbols = (csymbols+rbsymbols+op_table.keys).flatten.compact.uniq.sort
presyms = File.readlines(presym_file, chomp: true) rescue []
presyms = File.readlines(presym_file) rescue []
presyms.each{|x| x.chomp!}
if presyms != symbols
File.write(presym_file, symbols.join("\n"))
end