[#413] Should we check alloca ret val? — Michal Rokos <m.rokos@...>
Hi,
7 messages
2002/09/03
[#441] Patch to add a Module#const_missing method — JanArne.Petersen@... (Jan Arne Petersen)
Hi,
11 messages
2002/09/05
[#443] Re: Patch to add a Module#const_missing method
— matz@... (Yukihiro Matsumoto)
2002/09/06
Hi,
[#444] io_write()/fwrite() and EINTR on Solaris — Jos Backus <jos@...>
I am encountering a problem similar to the one mentioned here,
19 messages
2002/09/06
[#453] Re: io_write()/fwrite() and EINTR on Solaris
— nobu.nokada@...
2002/09/08
Hi,
[#454] Re: io_write()/fwrite() and EINTR on Solaris
— matz@... (Yukihiro Matsumoto)
2002/09/09
Hi
[#469] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/09/09
On Mon, Sep 09, 2002 at 03:55:13PM +0900, Yukihiro Matsumoto wrote:
[#479] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/09/10
On Tue, Sep 10, 2002 at 01:04:10AM +0900, Jos Backus wrote:
[#492] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/09/21
On Wed, Sep 11, 2002 at 02:23:33AM +0900, Jos Backus wrote:
[#495] Re: io_write()/fwrite() and EINTR on Solaris
— nobu.nokada@...
2002/09/21
Hi,
[#496] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/09/21
Hello,
[#564] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/11/06
On Sun, Sep 22, 2002 at 04:24:31AM +0900, Jos Backus wrote:
[#566] Re: io_write()/fwrite() and EINTR on Solaris
— nobu.nokada@...
2002/11/07
Hi,
[#567] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/11/07
On Thu, Nov 07, 2002 at 01:43:03PM +0900, nobu.nokada@softhome.net wrote:
[#568] Re: io_write()/fwrite() and EINTR on Solaris
— nobu.nokada@...
2002/11/07
Hi,
[#569] Re: io_write()/fwrite() and EINTR on Solaris
— Jos Backus <jos@...>
2002/11/07
On Thu, Nov 07, 2002 at 03:49:51PM +0900, nobu.nokada@softhome.net wrote:
[#449] ruby.h, string.c — Michal Rokos <m.rokos@...>
Hello,
7 messages
2002/09/06
[#459] Parse.y — Michal Rokos <m.rokos@...>
Hi,
6 messages
2002/09/09
[#461] Related to [Memleak] in sprintf.c — Michal Rokos <m.rokos@...>
Hi,
5 messages
2002/09/09
[#508] can java applications invoke ruby scripts?? — "John Davis" <javaccnews@...>
I want to know if Java applications can invoke ruby scripts?? In other
8 messages
2002/09/26
RE: Set.rb patch
From:
"Christoph" <chr_news@...>
Date:
2002-09-04 10:05:22 UTC
List:
ruby-core #431
Akinori MUSHA wrote ...
> D'oh, I was confused. I meant (a.hash == b.hash => a.eql?(b)) i.e.
Boy, do I know this feeling;-)
> (!a.eql?(b) => a.hash != b.hash).
>
> And the following test is an irrelevant requirement anyway:
I added the test below since I (wrongly) assumed that it
would catch a bug of your eql? implementation. I forgot
that Hash's hash is content based (actually I knew better
but then I was being my usual confused self).
Since Hash::hash is strictly ``id'' based it seems
to me that using the id of the instance variable @hash
def hash
@hash.hash
end
is pretty much equivalent to not defining a Set::hash
method at all (in other words Set::hash == Set::id).
In your previous email you voiced serious doubt
over the usefulness (and computational feasibility)
of a contend based hash method like
def hash
inject(size*size) {|sum,e| sum+=e.hash }
end.
However don't forget this is exactly how the Array hash
method is the defined, the only (main) difference being
that the latter is sensitive to the element order. Also
if the Set::hash method is not content sensitive
it essentially makes no sense to talk about
Sets of Sets, like a partition of a given Set.
For example, right now
Set[Set[1,2],Set[3,4]] != Set[Set[1,2],Set[3,4]]
>
> > > + def test_eql?
> > > + a = EqlClass.new
> > > + b = EqlClass.new until b.hash == a.hash
> > > + assert !(Set[a].eql?(Set[b]))
> > > + end
>
> I think x.eql?(y) does not need to be false for any given x and y. It
> is certainly not preferable but the following definition of a class is
> possible and legal:
>
> class Foo
> def hash
> 1
> end
>
> def eql?()
> true
> end
> end
>
> Am I missing something?
Not that I know off ...
/Christoph