[#30060] merge YARV — SASADA Koichi <ko1@...>

Hi,

20 messages 2006/12/31
[#30061] Re: merge YARV — SASADA Koichi <ko1@...> 2006/12/31

 ささだです。

[ruby-dev:30000] lib/irb/locale.rb uses File.exists?

From: "Yutaka Kanemoto" <kinpoco@...>
Date: 2006-12-08 19:47:41 UTC
List: ruby-dev #30000
金本ともうします。
おせわになります。

すでにお気づきかもしれませんが、1.9のirbでおこられました。
/home/ykane/r19/lib/ruby/1.9/irb/locale.rb:156:in `search_file':
undefined method `exists?' for File:Class (NoMethodError)
こんな感じでしょうか。

Index: lib/irb/locale.rb
===================================================================
RCS file: /src/ruby/lib/irb/locale.rb,v
retrieving revision 1.9
diff -U2 -r1.9 locale.rb
--- lib/irb/locale.rb   26 Aug 2005 05:36:23 -0000      1.9
+++ lib/irb/locale.rb   8 Dec 2006 19:37:24 -0000
@@ -154,6 +154,6 @@

     def search_file(path, file)
-      if File.exists?(p1 = path + lc_path(file, "C"))
-       if File.exists?(p2 = path + lc_path(file))
+      if File.exist?(p1 = path + lc_path(file, "C"))
+       if File.exist?(p2 = path + lc_path(file))
          return p2
        else

これで、
% find . -name \*.rb -exec fgrep -li File.exists\? '{}' \;
にひっかかるのはとりあえずありませんでした。

よろしくお願いいたします。
-- 
Yutaka KANEMOTO
http://d.hatena.ne.jp/kinpoco/

In This Thread

Prev Next