[#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: new method dispatch rule (matz' proposal)

From: Daniel DeLorme <dan-ml@...42.com>
Date: 2007-06-14 23:37:37 UTC
List: ruby-core #11467
Rick DeNatale wrote:
> I'm not sure it should. Overriding a method is perfectly natural,
> sometimes you call super as part of that,when you are augmenting the
> inherited method, but sometimes you ARE replacing it and that's fine.

Sometimes but IMHO rarely. If the parent class has some implementation, 
subclasses are more likely to augment/supplement that implementation 
rather than discard it completely. IMHO discarding the parent method has 
a strong risk of breaking stuff if the implementation of that parent 
method ever has to change.

However I have to admit that it could get complicated when method 
aliasing is used instead of super, like rails does a lot.

> Note that this is a temporal ordering, the code need not appear in the
> same file, for example the bar method might be added to the base class
> foo in a gem.
> 
> To make it more explicit, should Ruby examine all existing
> superclasses AND subclasses AND including classes when changing a
> class/module?
> 
> What about singleton methods and classes?
> 
> There be dragons!
> 
> There's no magic bullet to warding off changes due to changing
> ancestors and descendants, the best one can do is to be aware of what
> CAN happen, and have a good set of regression tests to detect
> problems.

It might be tricky in some edge cases but a solution doesn't need to be 
a magic bullet in order to be useful. Such a warning would have been 
useful to me when I was a newbie and wondering why the module I was 
including in a class wasn't overriding the methods I wanted it to.

Daniel


In This Thread