aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtool/update-bundled_gems.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/update-bundled_gems.rb b/tool/update-bundled_gems.rb
index 2f088804ef..f27ba98961 100755
--- a/tool/update-bundled_gems.rb
+++ b/tool/update-bundled_gems.rb
@@ -2,10 +2,11 @@
BEGIN {
require 'rubygems'
date = nil
-}
-END {
# STDOUT is not usable in inplace edit mode
output = $-i ? STDOUT : STDERR
+}
+output = STDERR if ARGF.file == STDIN
+END {
output.print date.strftime("latest_date=%F") if date
}
unless /^[^#]/ !~ (gem = $F[0])