On Mon, 2 Jul 2001, ts wrote: > >>>>> "D" == David Alan Black <dblack / candle.superlink.net> writes: > > D> then I wonder whether it should perhaps be hidden -- that is, whether > D> the test for valid argument to #raise should be internal to eval.c, > D> and not resurface as a public instance method of Exception. > > I've not understood sorry. #raise want a new object Exception and for this > it call exception (which is ::exception or #exception). > > You want that #exception be a private method ? There are really two threads of discussion here: first, whether #exception should return a clone instead of a new object (the RCR), and second, whether it's really necessary for #exception to exist at all. (I'm clarifying the separation so that if it turns out that it *is* good for it to exist, I can still argue for the change in behavior :-) With regard to the second point: it's that I think it should be a private method, but that I wonder whether it should be/needs to be a Ruby method at all. It seems more like part of the implementation internals (testing for validity of arguments to #raise). By way of comparison: every time there's: if (TYPE(arg) == T_ARRAY) {...} there could be, instead, something like: ID array = rb_intern("array"); /* ... */ if (rb_respond_to(arg, array)) {...} along with an #array method to which some objects would respond and others wouldn't. That would feel, to me, like a blurring of implementation internals (testing for type) and Ruby itself... which is what I'm wondering about #exception. David -- David Alan Black home: dblack / candle.superlink.net work: blackdav / shu.edu Web: http://pirate.shu.edu/~blackdav