ruby-changes:68478
From: Nobuyoshi <ko1@a...>
Date: Fri, 15 Oct 2021 19:59:55 +0900 (JST)
Subject: [ruby-changes:68478] 19beb028e7 (master): Make explicit opening files
https://git.ruby-lang.org/ruby.git/commit/?id=19beb028e7 From 19beb028e70d6e6893b0fb1107eb95428256588b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 15 Oct 2021 19:43:39 +0900 Subject: Make explicit opening files --- lib/mkmf.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 79dd3f7172..c9eac56702 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -447,7 +447,7 @@ EOM https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L447 src.sub!(/[^\n]\z/, "\\&\n") count = 0 begin - open(conftest_source, "wb") do |cfile| + File.open(conftest_source, "wb") do |cfile| cfile.print src end rescue Errno::EACCES @@ -1738,7 +1738,7 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1738 hdr = hdr.join("") log_src(hdr, "#{header} is") unless (IO.read(header) == hdr rescue false) - open(header, "wb") do |hfile| + File.open(header, "wb") do |hfile| hfile.write(hdr) end end @@ -2350,7 +2350,7 @@ CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$ https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2350 " #" conf = yield(conf) if block_given? - mfile = open("Makefile", "wb") + mfile = File.open("Makefile", "wb") mfile.puts(conf) mfile.print " all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"} -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/