From: "NAKAMURA, Hiroshi" Date: 2003-09-28T18:14:33+09:00 Subject: [ruby-dev:21420] test/fileutils/test_fileutils.rb なひです。 CVSのtest/fileutils/test_fileutils.rbですが、symlinkが 残ってしまうので、意図的でなければ消したいです。ま、テストの コードにこだわり過ぎるのはよくないんですけど。 あと、不要な仮定がありそうだったので削ってみました。 どうでしょう > 青木さん Index: test_fileutils.rb =================================================================== RCS file: /src/ruby/test/fileutils/test_fileutils.rb,v retrieving revision 1.2 diff -u -2 -r1.2 test_fileutils.rb --- test_fileutils.rb 27 Sep 2003 00:44:50 -0000 1.2 +++ test_fileutils.rb 28 Sep 2003 09:11:10 -0000 @@ -19,8 +19,8 @@ rescue NotImplementedError return false - rescue - return true + ensure + File.unlink 'not_exist_2' if File.symlink? 'not_exist_2' end - true # never reach + true end