[Groonga-commit] droonga/droonga-engine at 2c991c5 [master] Use Tempfile.open directly

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Tue May 27 17:13:24 JST 2014


YUKI Hiroshi	2014-05-27 17:13:24 +0900 (Tue, 27 May 2014)

  New Revision: 2c991c538f446ba551ca6ffa8ce52f28c85ba02a
  https://github.com/droonga/droonga-engine/commit/2c991c538f446ba551ca6ffa8ce52f28c85ba02a

  Message:
    Use Tempfile.open directly

  Modified files:
    bin/droonga-engine-catalog-generate

  Modified: bin/droonga-engine-catalog-generate (+1 -2)
===================================================================
--- bin/droonga-engine-catalog-generate    2014-05-27 17:10:02 +0900 (5340c90)
+++ bin/droonga-engine-catalog-generate    2014-05-27 17:13:24 +0900 (cb31a3c)
@@ -101,8 +101,7 @@ def open_output(path)
   else
     # Don't output the file directly to prevent loading of incomplete file!
     path = Pathname(path)
-    temp_file = Tempfile.new(path.basename.to_s, path.parent.to_s)
-    File.open(temp_file, "w") do |output|
+    Tempfile.open(path.basename.to_s, path.parent.to_s, "w") do |output|
       yield(output)
     end
     File.rename(temp_file.path, path.to_s)
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る