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

ruby-changes:36824

From: akr <ko1@a...>
Date: Sat, 20 Dec 2014 17:58:13 +0900 (JST)
Subject: [ruby-changes:36824] akr:r48905 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): Accept nil again, as Ruby 2.1.

akr	2014-12-20 17:58:07 +0900 (Sat, 20 Dec 2014)

  New Revision: 48905

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

  Log:
    * lib/tmpdir.rb (Dir.mktmpdir): Accept nil again, as Ruby 2.1.
      [ruby-core:66943] [Bug #10616] Fixed by Alex Slynko.

  Modified files:
    trunk/ChangeLog
    trunk/lib/tmpdir.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48904)
+++ ChangeLog	(revision 48905)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Dec 20 17:49:03 2014  Tanaka Akira  <akr@f...>
+
+	* lib/tmpdir.rb (Dir.mktmpdir): Accept nil again, as Ruby 2.1.
+	  [ruby-core:66943] [Bug #10616] Fixed by Alex Slynko.
+
 Sat Dec 20 11:22:58 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/fiddle/depend, ext/fiddle/extconf.rb: try to build bundled
Index: lib/tmpdir.rb
===================================================================
--- lib/tmpdir.rb	(revision 48904)
+++ lib/tmpdir.rb	(revision 48905)
@@ -81,8 +81,8 @@ class Dir https://github.com/ruby/ruby/blob/trunk/lib/tmpdir.rb#L81
   #    FileUtils.remove_entry dir
   #  end
   #
-  def Dir.mktmpdir(prefix_suffix="d", *rest)
-    path = Tmpname.create(prefix_suffix, *rest) {|n| mkdir(n, 0700)}
+  def Dir.mktmpdir(prefix_suffix=nil, *rest)
+    path = Tmpname.create(prefix_suffix || "d", *rest) {|n| mkdir(n, 0700)}
     if block_given?
       begin
         yield path

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

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