[#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: method_missing for Enumerator

From: "Rick DeNatale" <rick.denatale@...>
Date: 2007-06-25 20:24:27 UTC
List: ruby-core #11538
On 6/25/07, TRANS <transfire@gmail.com> wrote:
> On 6/25/07, Rick DeNatale <rick.denatale@gmail.com> wrote:

> > I had the same reaction.  There are issues with how you compose uses
> > of method_missing.
> >
> > Note that rspec had to do away with using method_missing because it
> > and activerecord were 'fighting' over it.
> >
> > http://blog.davidchelimsky.net/articles/2007/01/10/rspec-should-use_a_little_less_magic
>
> It doesn't explain how the conflict was arising. It's usually pretty
> easy to avoid conflicts --as long as the set of methods don't overlap.
> You simply alias the original method_missing and use it as a fallback.

The problem is when you can't in general tell if the methods overlap.
For example, your method_missing doesn't handle a particular set of
methods, iit just blindly forwards to the elements.

A lot of uses of method_missing are dynamic, and don't have a fixed
set of messages they handle. The point is that it's quite hard if not
impossible to come up with a set of 'standards' for composing
method_missing which don't provide opportunities for unpleasant
surprises.


> RSpec's old syntax was fundamentally flawed (a bad idea they got from
> Rails!) and unfortunately the new syntax isn't much better either.
> Anyway, I digress.

Not sure if it's the syntax or the implementation.  As far as I can
see doing away with the use of method_missing didn't require a syntax
change.  The big problem I sense with RSpec it how many methods they
add to both Object and Kernel.  I'm not sure how good it is for a test
tool to alter the subjects of the test so much.

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

In This Thread