[MacRuby] #1403: Modules included indirectly get included twice

MacRuby ruby-noreply at macosforge.org
Wed Feb 29 07:24:42 PST 2012


#1403: Modules included indirectly get included twice
----------------------------------------+-----------------------------------
 Reporter:  ernest.prabhakar@…          |       Owner:  lsansonetti@…        
     Type:  defect                      |      Status:  new                  
 Priority:  major                       |   Milestone:  MacRuby 0.11         
Component:  MacRuby                     |    Keywords:                       
----------------------------------------+-----------------------------------

Comment(by watson1978@…):

 I had improved this issue in
 https://github.com/MacRuby/MacRuby/commit/677f704206497cbe9d65d7ba088a8d283d283c7f
 [[BR]]

 {{{
 module Dog; end

 module Core
   #include Dog
 end

 module Factory
   include Core
 end

 class Cat
   include Factory
 end

 p Cat.ancestors
 }}}

 {{{
 $ ruby19 t.rb
 [Cat, Factory, Core, Object, Kernel, BasicObject]

 $ macruby t.rb
 [Cat, Factory, Core, NSObject, Kernel]
 }}}

 but, still strange ancestors are display if there is more complex
 including.

 {{{
 module Dog; end

 module Core
   include Dog
 end

 module Factory
   include Core
 end

 class Cat
   include Factory
 end

 p Cat.ancestors
 }}}

 {{{
 $ ruby19 t.rb
 [Cat, Factory, Core, Dog, Object, Kernel, BasicObject]

 $ macruby t.rb
 [Cat, Factory, Dog, Core, Dog, NSObject, Kernel]
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1403#comment:3>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list