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

ruby-changes:34837

From: hsbt <ko1@a...>
Date: Thu, 24 Jul 2014 04:44:32 +0900 (JST)
Subject: [ruby-changes:34837] hsbt:r46920 (trunk): * lib/tempfile.rb: split executable code into sample directory.

hsbt	2014-07-24 04:44:23 +0900 (Thu, 24 Jul 2014)

  New Revision: 46920

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

  Log:
    * lib/tempfile.rb: split executable code into sample directory.
    * sample/tempfile.rb: ditto.

  Added files:
    trunk/sample/tempfile.rb
  Modified files:
    trunk/ChangeLog
    trunk/lib/tempfile.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46919)
+++ ChangeLog	(revision 46920)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jul 24 04:36:49 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* lib/tempfile.rb: split executable code into sample directory.
+	* sample/tempfile.rb: ditto.
+
 Thu Jul 24 04:29:36 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* lib/pstore.rb: split executable code into sample directory.
Index: sample/tempfile.rb
===================================================================
--- sample/tempfile.rb	(revision 0)
+++ sample/tempfile.rb	(revision 46920)
@@ -0,0 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/sample/tempfile.rb#L1
+require 'tempfile'
+
+f = Tempfile.new("foo")
+f.print("foo\n")
+f.close
+f.open
+p f.gets # => "foo\n"
+f.close!
Index: lib/tempfile.rb
===================================================================
--- lib/tempfile.rb	(revision 46919)
+++ lib/tempfile.rb	(revision 46920)
@@ -381,13 +381,3 @@ def Tempfile.create(basename, *rest) https://github.com/ruby/ruby/blob/trunk/lib/tempfile.rb#L381
     tmpfile
   end
 end
-
-if __FILE__ == $0
-#  $DEBUG = true
-  f = Tempfile.new("foo")
-  f.print("foo\n")
-  f.close
-  f.open
-  p f.gets # => "foo\n"
-  f.close!
-end

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

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