[前][次][番号順一覧][スレッド一覧]

ruby-changes:29280

From: naruse <ko1@a...>
Date: Sun, 16 Jun 2013 16:12:14 +0900 (JST)
Subject: [ruby-changes:29280] naruse:r41331 (trunk): * tool/config_files.rb: use URI.read to allow it runs with Ruby 1.8.5.

naruse	2013-06-16 16:10:17 +0900 (Sun, 16 Jun 2013)

  New Revision: 41331

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41331

  Log:
    * tool/config_files.rb: use URI.read to allow it runs with Ruby 1.8.5.

  Modified files:
    trunk/ChangeLog
    trunk/tool/config_files.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41330)
+++ ChangeLog	(revision 41331)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jun 16 16:04:38 2013  NARUSE, Yui  <naruse@r...>
+
+	* tool/config_files.rb: use URI.read to allow it runs with Ruby 1.8.5.
+
 Sun Jun 16 14:32:25 2013  Tanaka Akira  <akr@f...>
 
 	* bignum.c (bary_pack) Extracted from rb_integer_pack_internal.
Index: tool/config_files.rb
===================================================================
--- tool/config_files.rb	(revision 41330)
+++ tool/config_files.rb	(revision 41331)
@@ -2,7 +2,7 @@ require 'open-uri' https://github.com/ruby/ruby/blob/trunk/tool/config_files.rb#L2
 
 ConfigFiles = "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=%s;hb=HEAD"
 def ConfigFiles.download(name, dir = nil)
-  data = open(self % name, &:read)
+  data = URI.read(self % name)
   file = dir ? File.join(dir, name) : name
   open(file, "wb", 0755) {|f| f.write(data)}
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]