[Ruby 1.9-Bug#4331][Open] FileUtils::DryRun.copy_entry makes changes

Bug #4331: FileUtils::DryRun.copy_entry makes changes.

起票者: hanae aoki
ステータス: Open, 優先度: Normal
ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]

$ ls src/
$ ls dst/
$ ruby -e “require 'fileutils; FileUtils::DryRun.copy_entry ‘src/’,
$ ls dst/
$ 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
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.

チケット #4331 が更新されました。 (by Nobuyoshi N.)

ステータス OpenからClosedに変更
進捗 % 0から100に変更

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]