[#21338] $SAFE=4 での autoload — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

21 messages 2003/09/04
[#21346] Re: $SAFE=4 での autoload — nobu.nakada@... 2003/09/04

なかだです。

[#21359] Re: $SAFE=4 での autoload — Hidetoshi NAGAI <nagai@...> 2003/09/05

永井@知能.九工大です.

[#21419] Makefile.inのlex.c — Kazuhiro NISHIYAMA <zn@...>

西山和広です。

15 messages 2003/09/28

[ruby-dev:21420] test/fileutils/test_fileutils.rb

From: "NAKAMURA, Hiroshi" <nakahiro@...>
Date: 2003-09-28 09:14:33 UTC
List: ruby-dev #21420
なひです。

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


In This Thread

Prev Next