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

Bug #4331: FileUtils::DryRun.copy_entry makes changes.
http://redmine.ruby-lang.org/issues/show/4331

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

$ 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.

チケット #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]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs