[ruby-dev:31740] FileTest.identical? with IO

From: sheepman <sheepman@...>
Date: 2007-09-05 12:41:51 UTC
List: ruby-dev #31740
こんばんは sheepman です。

FileTest.identical? には引数として IO オブジェクトも渡すことが
できます。しかし IO が通常ファイルのそれかを検査していません。ですので、
以下のようなことが起こってしまいます。

$ cat t.rb
p FileTest.identical?($stdin, $stdout)

$ ruby-1.8 -v t.rb
ruby 1.8.6 (2007-09-01 patchlevel 5000) [i686-linux]
true

これはこういうものなのでしょうか。

-- 
sheepman / TAMURA Takashi
sheepman@sheepman.sakura.ne.jp

In This Thread

Prev Next