[MacRuby-devel] [MacRuby] #370: Inconsistency between macruby and ruby in a simple class

MacRuby ruby-noreply at macosforge.org
Fri Oct 9 11:50:35 PDT 2009


#370: Inconsistency between macruby and ruby in a simple class
-----------------------------------+----------------------------------------
 Reporter:  kfowler@…              |       Owner:  lsansonetti@…        
     Type:  defect                 |      Status:  new                  
 Priority:  major                  |   Milestone:  MacRuby 0.5          
Component:  MacRuby                |    Keywords:                       
-----------------------------------+----------------------------------------

Comment(by lsansonetti@…):

 Good catch, the problem is definitely in object.c:1896

 {{{
     if (init_obj != Qnil) {
         p = CLASS_OF(init_obj);
         while (p != 0) {
             if (p == klass) {
                 return init_obj;
             }
             p = RCLASS_SUPER(p);
         }
     }
 }}}

 If I remember correctly, this was added because some classes (Array for
 example) return different objects during #initialize that should be taken
 into account. The code should probably be altered to only handle these
 objects.

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



More information about the MacRuby-devel mailing list