[#11439] comments needed for Random class — "NAKAMURA, Hiroshi" <nakahiro@...>

-----BEGIN PGP SIGNED MESSAGE-----

15 messages 2007/06/12

[#11450] Re: new method dispatch rule (matz' proposal) — David Flanagan <david@...>

This is a late response to the very long thread that started back in

17 messages 2007/06/13

[#11482] Ruby Changes Its Mind About Non-Word Characters — James Edward Gray II <james@...>

Does this look like a bug to anyone else?

10 messages 2007/06/16

[#11505] Question about the patchlevel release cycle — Sylvain Joyeux <sylvain.joyeux@...4x.org>

1.8.6 thread support was broken in bad ways. It stayed for three months

20 messages 2007/06/20
[#11512] Re: Question about the patchlevel release cycle — Urabe Shyouhei <shyouhei@...> 2007/06/20

Hi, I'm the 1.8.6 branch manager.

[#11543] Re: Apple reportedly to ship with ruby 1.8.6-p36 unless informed what to patch — James Edward Gray II <james@...>

On Jun 27, 2007, at 4:47 PM, Bill Kelly wrote:

10 messages 2007/06/27

Re: Proc.==

From: Eric Hodel <drbrain@...7.net>
Date: 2007-06-05 21:32:44 UTC
List: ruby-core #11410
On Jun 5, 2007, at 11:48, David Flanagan wrote:

> Eric Hodel wrote:
>> A proc is more than just its body.
>
> I understand.  My point is that the Proc.== documentation says:
>
>      Return +true+ if _prc_ is the same object as _other_proc_, or if
>      they are both procs with the same body.
>
> To me, this implies that you can use == to compare the body of two  
> separate proc objects.  I couldn't come up with any case where you  
> could actually do this.  Nobu pointed out that when two procs have  
> empty bodies, == works for comparing them, but so far, there are no  
> other cases in which the documentation matches the implementation.
>
> I suggest that the implementation is correct and the documentation  
> is in error.

Proc#== works no differently than Object#==.  proc {} == proc {} due  
to an implementation detail.  To make this work the way you think it  
should work you'd need to walk the ASTs and so-forth of each proc.

Since we're talking about something implemented in C, I feel that  
"same" means pointers, not walking ASTs.

In This Thread