diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-05 10:10:36 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:04 +0900 |
| commit | 26da07db15c3628c6bb473ce4ae4bc98fa3f431b (patch) | |
| tree | 6050023c42600c11f9be1abec75447a7bc85f4c0 | |
| parent | 7ab7cadbbb012d9431928d9cfae09451eab86613 (diff) | |
| download | mruby-26da07db15c3628c6bb473ce4ae4bc98fa3f431b.tar.gz mruby-26da07db15c3628c6bb473ce4ae4bc98fa3f431b.zip | |
Avoid using `chomp:true` option to `File.readlines`.
The option is not available in the old version of Ruby.
| -rw-r--r-- | Rakefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |
