diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-11-21 16:20:17 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-11-21 22:16:49 +0900 |
commit | 612aa5c24a7c249867bbcd7d6567012aa6a7f4b9 (patch) | |
tree | 35581bf73b35123b08cc2ac9c9f453ab0010ff69 /lib/mkmf.rb | |
parent | 116920cff8739c49ba469bf243252f503e28f0fd (diff) |
Use class methods of `File` over `Kernel.open` and `IO.read`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6777
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r-- | lib/mkmf.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 3d0beebbf2..fba1e678c7 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1762,7 +1762,7 @@ SRC hdr << "#endif\n" hdr = hdr.join("") log_src(hdr, "#{header} is") - unless (IO.read(header) == hdr rescue false) + unless (File.read(header) == hdr rescue false) File.open(header, "wb") do |hfile| hfile.write(hdr) end |