1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

* sample/tempfile.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2014-07-23 19:44:23 +00:00
parent 31f2d1d7eb
commit a7f672a17e
3 changed files with 13 additions and 10 deletions

View file

@ -1,3 +1,8 @@
Thu Jul 24 04:36:49 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* lib/tempfile.rb: split executable code into sample directory.
* sample/tempfile.rb: ditto.
Thu Jul 24 04:29:36 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* lib/pstore.rb: split executable code into sample directory.

View file

@ -381,13 +381,3 @@ def Tempfile.create(basename, *rest)
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

8
sample/tempfile.rb Normal file
View file

@ -0,0 +1,8 @@
require 'tempfile'
f = Tempfile.new("foo")
f.print("foo\n")
f.close
f.open
p f.gets # => "foo\n"
f.close!