summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-18 06:08:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-18 06:08:54 +0000
commite627a028f3b7b7b49e299ca51efec216330250df (patch)
treec1c4ff1821db8570fbc314b29aa1a425314b4a9a
parentd7df70c08f25f4f21d0c5d7690657faae92026b0 (diff)
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
-rwxr-xr-xext/extmk.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index b80a4fc36e..d094891c5f 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -241,7 +241,7 @@ def extmake(target)
$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|