diff options
| author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-18 07:26:44 +0000 |
|---|---|---|
| committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-18 07:26:44 +0000 |
| commit | 95e76f1a2f358684591c4416a8547ac269d265f1 (patch) | |
| tree | c24eef4e7cc8bbc8adcf86a500ec6bf9be7d6e3e /lib | |
| parent | b6ee4132220966c654ac11a60fa1b8c812be2d70 (diff) | |
| download | ruby-95e76f1a2f358684591c4416a8547ac269d265f1.tar.gz ruby-95e76f1a2f358684591c4416a8547ac269d265f1.tar.xz ruby-95e76f1a2f358684591c4416a8547ac269d265f1.zip | |
Improve the comment section.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/tempfile.rb | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index e08cd7c6a..201a0f14f 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -1,19 +1,22 @@ # # $Id$ # -# The class for temporary files. -# o creates a temporary file, which name is "basename.pid.n" with mode "w+". -# o Tempfile objects can be used like IO object. -# o the temporary directory is determined by ENV['TMPDIR'], ENV['TMP'], -# ENV['TEMP'] and /tmp, in the order named. -# o when $SAFE > 0, you should specify a directory via the second argument +# This is a class for managing temporary files. +# +# o Tempfile::new("basename") creates a temporary file whose name is +# "basename.pid.n" and opens with mode "w+". +# o A Tempfile object can be treated as an IO object. +# o The temporary directory is determined by ENV['TMPDIR'], +# ENV['TMP'], and ENV['TEMP'] in the order named, and if none of +# them is available, it is set to /tmp. +# o When $SAFE > 0, you should specify a directory via the second argument # of Tempfile::new(), or it will end up finding an ENV value tainted and # pick /tmp. In case you don't have it, an exception will be raised. -# o tempfile.close(true) gets the temporary file removed immediately. -# o otherwise, the removal is delayed until the object is finalized. -# o with Tempfile#open, you can reopen the temporary file. -# o file mode of the temporary files is 0600. -# o this library is (considered to be) thread safe. +# o Tempfile#close(true) gets the temporary file removed immediately. +# o Otherwise, the removal is delayed until the object is finalized. +# o With Tempfile#open, you can reopen the temporary file. +# o The file mode for the temporary files is 0600. +# o This library is (considered to be) thread safe. require 'delegate' |
