[#1491] bug — Mathieu Bouchard <matju@...>
6 messages
2003/09/01
[#1492] non-blocking mode behavior (Re: bug)
— nobu.nokada@...
2003/09/01
Hi,
[#1512] New tests — Dave Thomas <Dave@...>
I was looking through the new test/ruby/* stuff just now, and notices
6 messages
2003/09/05
[#1533] GC disable / enable question — Torsten Rueger <torsten.rueger@...>
Moi,
7 messages
2003/09/17
[#1534] Re: GC disable / enable question
— nobu.nokada@...
2003/09/17
Hi,
[#1541] How to debug ? — Torsten Rueger <torsten.rueger@...>
Moi,
6 messages
2003/09/19
[#1542] Re: How to debug ?
— ts <decoux@...>
2003/09/19
>>>>> "T" == Torsten Rueger <torsten.rueger@hiit.fi> writes:
[#1551] Hashes as keys — "Nathaniel Talbott" <nathaniel@...>
I was just playing around with Hash#hash and discovered that you can't use a
13 messages
2003/09/23
[#1552] Re: Hashes as keys
— Jim Freeze <jim@...>
2003/09/23
On Wednesday, 24 September 2003 at 6:21:33 +0900, Nathaniel Talbott wrote:
[#1556] ostruct.rb patch — "Nathaniel Talbott" <nathaniel@...>
I've been finding OpenStruct to be very useful lately, and then I discovered
9 messages
2003/09/24
[#1557] Re: ostruct.rb patch
— "NAKAMURA, Hiroshi" <nahi@...>
2003/09/24
Hi, Nathaniel,
Re: ostruct.rb patch
From:
"NAKAMURA, Hiroshi" <nahi@...>
Date:
2003-09-24 02:26:59 UTC
List:
ruby-core #1559
Hi, Nathaniel,
> From: "Nathaniel Talbott" <nathaniel@talbott.ws>
> Sent: Wednesday, September 24, 2003 11:06 AM
> > You define == and hash, not eql? and hash, right?
> > What is the purpose of redefining #hash?
>
> Oops! I forgot that #eql?, not #==, is the #hash counterpart (there's
> entirely too much Java in my past). I'll drop the redefinition of #hash.
Ah. I tend to write 'def hashCode ...', too. :-)
> > > + def ==(other)
> > > + return false unless(other.kind_of?(OpenStruct))
> > > + return @table == other.instance_eval{@table}
> > > + end
> >
> > You can use protected method to avoid this kind of
> > instance_eval. Ignore me if it's intentional.
>
> I hadn't thought of that. Do you think a protected method is better? I'm
> assuming it's probably faster.
I think so. From my ruby life for now, here's the only place
where protected method lives.
It may be wrong. Folks, tell me your "protected method" recipe
if you have good one.
Regards,
// NaHi