ruby-changes:33912
From: nobu <ko1@a...>
Date: Sun, 18 May 2014 15:09:02 +0900 (JST)
Subject: [ruby-changes:33912] nobu:r45993 (trunk): extmk.rb: discard empty Makefile
nobu 2014-05-18 15:08:54 +0900 (Sun, 18 May 2014) New Revision: 45993 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45993 Log: extmk.rb: discard empty Makefile * ext/extmk.rb (extmake): discard empty Makefile which can be left accidentally. Modified files: trunk/ext/extmk.rb Index: ext/extmk.rb =================================================================== --- ext/extmk.rb (revision 45992) +++ ext/extmk.rb (revision 45993) @@ -241,7 +241,7 @@ def extmake(target) https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L241 $0 = $PROGRAM_NAME 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? if ok open(makefile, "r+b") do |f| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/