From: Jim Weirich Date: 2004-11-24T14:54:32+09:00 Subject: Re: How to avoid inheriting Object? On Tuesday 23 November 2004 10:18 pm, Austin Ziegler wrote: > On Wed, 24 Nov 2004 10:29:09 +0900, itsme213 wrote: > > How do I create a class that does not inherit from Object? > > You can't. All objects inherit from Object. > > If, however, you want a bare class (e.g., nothing except __send__ and > __id__), then there are ways to do that. Look at the evilruby project > and I think that Jim Weirich has said stuff about this on his > onestepback blog. Builder 1.2.2 is available as a gem and includes the most recent version of BlankSlate. Although conceptually simple, it turns out there are a few gotchas when writing a good BlankSlate object. The version in builder is addresses all the issues I am aware of. The blog entry describing the initial BlankSlate is at http://onestepback.org/index.cgi/Tech/Ruby/BlankSlate.rdoc. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)