From: Eric Mahurin Date: 2005-06-30T03:14:22+09:00 Subject: Re: yield does not take a block --- Daniel Brockman wrote: > You didn't respond to my question: > > >> I don't see how returning a new class could be useful in > any way. > >> For example, what should happen if you say this? > >> > >> class Numeric ; def infinite? ; false end end The non-destructive version of this would be (simple inheritance): class MyNumeric < Numeric; def infinite?;false;end;end I know that is not what you wanted and not nearly as useful. I was just making the point that this useful behavior (modifying classes at run-time) does come at a cost: it ties ruby to a very dynamic object model that makes it difficult for ruby to do certain types of optimizations. __________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail