Skip to content

Commit

Permalink
Prefer to use File.binwrite instead of IO.binwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt authored and kou committed Feb 28, 2023
1 parent 2d03df2 commit 8168233
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/fiddle/win32/libffi-config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
hdr = File.binread("#{srcdir}/include/ffi.h.in")
hdr.gsub!(/@(\w+)@/) {conf[$1] || $&}
hdr.gsub!(/^(#if\s+)@\w+@/, '\10')
IO.binwrite("#{builddir}/include/ffi.h", hdr)
File.binwrite("#{builddir}/include/ffi.h", hdr)

mk = File.binread("#{basedir}/libffi.mk.tmpl")
mk.gsub!(/@(\w+)@/) {conf[$1] || $&}
IO.binwrite("Makefile", mk)
File.binwrite("Makefile", mk)

0 comments on commit 8168233

Please sign in to comment.