On Thu, May 28, 2009 at 6:53 PM, Yukihiro Matsumoto <matz / ruby-lang.org> wrote:
> Hi,
>
> In message "Re: [ruby-core:23604] Re: Defining #name= at the class level"
>  >
> |There is a related question that I thought of when trying
> |to navigate through this particular problem: Module#name=
> |is not defined, why?
>
> I don't see any reason to allow changing the name.  

Well, I think the problem here is that when you use attr_accessor at
the class level, it re-writes name to point at an ivar.   Since
Rubinius stores the name in an ivar in the first place, this causes a
clash (because it expects @name to be the real name of the module).

Do you still think that the code I showed before should work, considering this?

(Please note I'm very much a beginner when it comes to Ruby's internals)

-greg