#392: String subclass obj.dup loses its class
------------------------------+---------------------------------------------
 Reporter:  timsha...@…       |       Owner:  lsansone...@…        
     Type:  defect            |      Status:  new                  
 Priority:  major             |   Milestone:  MacRuby 0.5          
Component:  MacRuby           |    Keywords:  dup string           
------------------------------+---------------------------------------------
 From normal IRB

 >> class StringChild < String; end
 => nil
 >> c = StringChild.new
 => ""
 >> c.class
 => StringChild
 >> d = c.dup
 => ""
 >> d.class
 => StringChild


 from macirb (0.5b1)

 >> class StringChild < String; end
 => nil
 >> c = StringChild.new
 => ""
 >> c.class
 => StringChild
 >> d = c.dup
 => ""
 >> d.class
 => NSMutableString


 I found this through trying to use the BlueCloth gem (renders Markdown to
 HTML).

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/392>
MacRuby <http://macruby.org/>

_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to