#142: Infinite loop creating new Monitor object
---------------------------------------+------------------------------------
 Reporter:  [EMAIL PROTECTED]                      |        Owner:  [EMAIL 
PROTECTED]        
     Type:  defect                     |       Status:  closed               
 Priority:  major                      |    Milestone:  MacRuby 0.4          
Component:  MacRuby                    |   Resolution:  fixed                
 Keywords:                             |  
---------------------------------------+------------------------------------
Changes (by [EMAIL PROTECTED]):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 So I have been investigating different solutions to re-implement the mixin
 feature, but I was unsuccessful.

 My first attempt was to create intermediate classes and interpose them
 inside the ancestor chain, but this causes some problem with the 64-bit
 libobjc runtime (which does not authorize you to change the superclass of
 NSObject), it requires to allocate a complete class-pair (both the class
 and its metaclass) every time, and it does not work if you extend a
 singleton class.

 My second attempt was to monkey-patch the libobjc method lookup
 functionality to also look inside mixed modules at runtime. This was
 working but I could not make it stable (and also it's really evil). This
 was just to experiment a potential change that I would submit to the
 libobjc guys.

 My third attempt was the successful one, I basically used a solution very
 similar to Jamis' patch and removed the unnecessary code paths. When
 dispatching the super message we no longer forward it to the real
 superclass but use the Ruby ancestors chain.

 The problem should be fixed in r750.

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

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to