Bug #4331
closedFileUtils::DryRun.copy_entry makes changes.
Description
=begin
$ ls src/
README
$ ls dst/
$ ruby -e "require 'fileutils; FileUtils::DryRun.copy_entry 'src/', 'dst/'"
$ ls dst/
README
$ ruby -v
ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]
I expected to make no changes and get some messages, but got a change and no messages.
The Reference manual (http://www.ruby-doc.org/stdlib/libdoc/fileutils/rdoc/classes/FileUtils/DryRun.html) said that "never changes files/directories".
I think this mismatch between documents and actual behavior is harmful.
A easiest way to resolve the problem is to remove methods which does not accept 'noop' option from FileUtils::DryRun.
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r30787.
Hanae, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/fileutils.rb (FileUtils::LowMethods): make low level methods
in NoWrite and DryRun to do nothing. [ruby-dev:43129]
=end