[Groonga-commit] pgroonga/pgroonga at 5832a42 [master] Don't use Pathname

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Apr 29 11:45:33 JST 2015


Kouhei Sutou	2015-04-29 11:45:33 +0900 (Wed, 29 Apr 2015)

  New Revision: 5832a423f137fdda87f64d337611f54f9b8990c3
  https://github.com/pgroonga/pgroonga/commit/5832a423f137fdda87f64d337611f54f9b8990c3

  Message:
    Don't use Pathname

  Modified files:
    Rakefile

  Modified: Rakefile (+3 -3)
===================================================================
--- Rakefile    2015-04-29 11:42:46 +0900 (8454a74)
+++ Rakefile    2015-04-29 11:45:33 +0900 (eabf385)
@@ -32,13 +32,13 @@ end
 
 def download(url, download_dir)
   base_name = url.split("/").last
-  absolute_output_path = download_dir + base_name
+  absolute_output_path = File.join(download_dir, base_name)
 
-  unless absolute_output_path.exist?
+  unless File.exist?(absolute_output_path)
     mkdir_p(download_dir)
     rake_output_message "Downloading... #{url}"
     open(url) do |downloaded_file|
-      absolute_output_path.open("wb") do |output_file|
+      File.open(absolute_output_path, "wb") do |output_file|
         output_file.print(downloaded_file.read)
       end
     end
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index