From: Paul Brannan Date: 2004-09-09T00:00:40+09:00 Subject: Re: Marshal and allocating objects On Wed, Sep 08, 2004 at 11:47:48PM +0900, ts wrote: > >>>>> "P" == Paul Brannan writes: > > P> In order to demonstrate why I do not think const_missing should be > P> defined for class Object, I intentionally misspelled "SOME_CONSTATN". > P> Before const_missing was defined I would get an exception here, > P> whereas after Stephen's version of const_missing is in place, I will > P> instead get a new class. Even with well-written unit tests, finding > P> this misspelling can be a challenge. > > and ??? > > This does not his problem where `M.allocate' work but not 'Marshal.load()' Your sentence seems to be missing a necessary verb, so I'm not sure what you are trying to say. All I mean to say is that using const_missing to create new classes on-the-fly is a bad idea, imo. This is what the original poster was trying to do. It does not mean that changing Marhsal.load to have consistent lookup with the rest of Ruby is a bad idea. Paul