Project

General

Profile

Actions

Feature #3427

closed

instances of Dir class can't be compared

Added by coatl (caleb clausen) almost 14 years ago. Updated about 12 years ago.

Status:
Rejected
Target version:
[ruby-core:30732]

Description

=begin
Dir#== and friends seem to be absent.

$ install/bin/ruby -e 'p Dir.new(".")==Dir.new(".")'
false
=end

Actions #1

Updated by mame (Yusuke Endoh) almost 14 years ago

  • Target version set to 2.0.0

=begin
Hi,

2010/6/11 caleb clausen :

Dir#== and friends seem to be absent.

In principle, absent method is not a bug.
I move this ticket to 1.9.x feature.

File#== is also absent, but I think it is arguable whether it
should return true or false:

f1 = File.new("foo.txt")
f2 = File.new("foo.txt")
f1.gets
p f1 == f2 #=> true expected? or false?

--
Yusuke Endoh
=end

Actions #2

Updated by coatl (caleb clausen) almost 14 years ago

=begin
Oh, I see. Dir is actually a directory handle. I was thinking it was just a wrapper around the directory name; more akin to a Pathname than a File.

I agree, that makes == for Dir instances much less likely to be needed.
=end

Updated by nahi (Hiroshi Nakamura) about 12 years ago

  • Assignee set to mame (Yusuke Endoh)
  • Description updated (diff)
  • Status changed from Open to Rejected

Marked as Rejected since the original poster agreed that it's less likely to be needed.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0