1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

extmk.rb: discard empty Makefile

* ext/extmk.rb (extmake): discard empty Makefile which can be left
  accidentally.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-05-18 06:08:54 +00:00
parent d7df70c08f
commit e627a028f3

View file

@ -241,7 +241,7 @@ def extmake(target)
$0 = $PROGRAM_NAME $0 = $PROGRAM_NAME
end end
end end
ok &&= File.open(makefile){|f| !f.gets[DUMMY_SIGNATURE]} ok &&= File.open(makefile){|f| s = f.gets and !s[DUMMY_SIGNATURE]}
ok = yield(ok) if block_given? ok = yield(ok) if block_given?
if ok if ok
open(makefile, "r+b") do |f| open(makefile, "r+b") do |f|