mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Make explicit opening files
This commit is contained in:
parent
855db8e9ce
commit
19beb028e7
1 changed files with 3 additions and 3 deletions
|
@ -447,7 +447,7 @@ EOM
|
||||||
src.sub!(/[^\n]\z/, "\\&\n")
|
src.sub!(/[^\n]\z/, "\\&\n")
|
||||||
count = 0
|
count = 0
|
||||||
begin
|
begin
|
||||||
open(conftest_source, "wb") do |cfile|
|
File.open(conftest_source, "wb") do |cfile|
|
||||||
cfile.print src
|
cfile.print src
|
||||||
end
|
end
|
||||||
rescue Errno::EACCES
|
rescue Errno::EACCES
|
||||||
|
@ -1738,7 +1738,7 @@ SRC
|
||||||
hdr = hdr.join("")
|
hdr = hdr.join("")
|
||||||
log_src(hdr, "#{header} is")
|
log_src(hdr, "#{header} is")
|
||||||
unless (IO.read(header) == hdr rescue false)
|
unless (IO.read(header) == hdr rescue false)
|
||||||
open(header, "wb") do |hfile|
|
File.open(header, "wb") do |hfile|
|
||||||
hfile.write(hdr)
|
hfile.write(hdr)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2350,7 +2350,7 @@ CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$
|
||||||
" #"
|
" #"
|
||||||
|
|
||||||
conf = yield(conf) if block_given?
|
conf = yield(conf) if block_given?
|
||||||
mfile = open("Makefile", "wb")
|
mfile = File.open("Makefile", "wb")
|
||||||
mfile.puts(conf)
|
mfile.puts(conf)
|
||||||
mfile.print "
|
mfile.print "
|
||||||
all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
|
all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
|
||||||
|
|
Loading…
Reference in a new issue