Hi --

On Thu, 12 Oct 2006, gwtmp01 / mac.com wrote:

>
> On Oct 11, 2006, at 3:13 PM, dblack / wobblini.net wrote:
>> I prefer it without that, since that makes it deviate from the #class
>> method, which it's otherwise precisely parallel to.  I'd rather that
>> singleton_class work like class than that it work like class_eval.
>> Otherwise you've got a situation where all classes except singleton
>> classes have to call class_eval, and I don't see any grounds for
>> granting that privilege.
>
> I agree with David's point about the discrepancy but couldn't that
> be also resolved by changing the standard #class method to behave like
> Ara's proposed #singleton_class ?

Yes, but that seems awfully magic and hidden.  I don't see what there
is about querying an object for its class that suggests a context for
an implied class_eval.


David

-- 
                   David A. Black | dblack / wobblini.net
Author of "Ruby for Rails"   [1] | Ruby/Rails training & consultancy [3]
DABlog (DAB's Weblog)        [2] | Co-director, Ruby Central, Inc.   [4]
[1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com
[2] http://dablog.rubypal.com    | [4] http://www.rubycentral.org