* lib/tmpdir.rb: update document for changing

FileUtils.remove_entry_secure to FileUtils.remove_entry.

* NEWS: add incompatiblity note for lib/tmpdir.rb.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-03-11 22:37:04 +00:00
Родитель bcb9e567c4
Коммит 48b5b163fc
3 изменённых файлов: 21 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Mon Mar 12 07:33:12 2012 Tanaka Akira <akr@fsij.org>
* lib/tmpdir.rb: update document for changing
FileUtils.remove_entry_secure to FileUtils.remove_entry.
* NEWS: add incompatiblity note for lib/tmpdir.rb.
Mon Mar 12 07:19:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/tmpdir.rb (Dir.tmpdir): should not use world-writable but

11
NEWS
Просмотреть файл

@ -73,6 +73,13 @@ with all sufficient information, see the ChangeLog file.
* Shellwords#shelljoin() accepts non-string objects in the given
array, each of which is stringified using to_s.
* lib/tmpdir.rb
* incompatible changes:
* Dir.mktmpdir uses FileUtils.remove_entry instead of
FileUtils.remove_entry_secure. This means that applications should not
change the permission of the created temporary directory to make
accessible from other users.
* zlib
* Added support for the new deflate strategies Zlib::RLE and Zlib::FIXED.
@ -93,3 +100,7 @@ with all sufficient information, see the ChangeLog file.
* Kernel#respond_to? against a protected method now returns false
unless the second argument is true.
* Dir.mktmpdir in lib/tmpdir.rb
See above.

Просмотреть файл

@ -36,6 +36,7 @@ class Dir
# Dir.mktmpdir creates a temporary directory.
#
# The directory is created with 0700 permission.
# Application should not change the permission to make the temporary directory accesible from other users.
#
# The prefix and suffix of the name of the directory is specified by
# the optional first argument, <i>prefix_suffix</i>.
@ -56,7 +57,7 @@ class Dir
# If a block is given,
# it is yielded with the path of the directory.
# The directory and its contents are removed
# using FileUtils.remove_entry_secure before Dir.mktmpdir returns.
# using FileUtils.remove_entry before Dir.mktmpdir returns.
# The value of the block is returned.
#
# Dir.mktmpdir {|dir|
@ -74,7 +75,7 @@ class Dir
# open("#{dir}/foo", "w") { ... }
# ensure
# # remove the directory.
# FileUtils.remove_entry_secure dir
# FileUtils.remove_entry dir
# end
#
def Dir.mktmpdir(prefix_suffix=nil, *rest)