< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事
N :次の記事(自分と同じ返事先を持つ)
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Hi !
A while ago I asked the questions below, and got no answer at all.
Depending on the answer, I was prepared to try sending in
some patches to help improve Ruby. But now I don't know what to
do.
/Johan Holmberg
On Sat, 11 Dec 2004, Johan Holmberg wrote:
>
> Hi!
>
> I wonder what the "philosophy" is regarding error handling in file related
> methods in Ruby. Let me give an example. It is the method
> Kernel.test(?-, ...), i.e. a test to see if two files are hard links
> to the same file:
>
> $ mkdir subdir
> $ touch subdir/aaa
> $ ln subdir/aaa subdir/bbb
> $
> $ chmod 0755 subdir
> $ ruby -e 'p test(?-, *ARGV)' subdir/aaa subdir/bbb
> true
> $
> $ chmod 0 subdir
> $ ruby -e 'p test(?-, *ARGV)' subdir/aaa subdir/bbb
> false <--- NOTE THIS !!!
> $
>
> The "problem" with this behaviour is that the files *are* hard links
> but the permissions prevents us from finding that out. I think it
> would be better to get an exception indicating that, instead of
> "lying" to the script.
>
> I suspect that Ruby behaves in this way in several similar situations.
>
> Should this be changed?
> If so, what would be the preferred action?
>
> /Johan Holmberg
>
>