From 26da07db15c3628c6bb473ce4ae4bc98fa3f431b Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 5 Jun 2020 10:10:36 +0900 Subject: Avoid using `chomp:true` option to `File.readlines`. The option is not available in the old version of Ruby. --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 1452d7903..e07ca16a8 100644 --- a/Rakefile +++ b/Rakefile @@ -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 -- cgit v1.2.3