[MacRuby-devel] [MacRuby] #540: segfault with NSURLDownload with GC on

MacRuby ruby-noreply at macosforge.org
Mon Jan 4 22:50:50 PST 2010

#540: segfault with NSURLDownload with GC on
 Reporter:  mattaimonetti@…          |       Owner:  lsansonetti@…        
     Type:  defect                   |      Status:  new                  
 Priority:  major                    |   Milestone:  MacRuby 0.5          
Component:  MacRuby                  |    Keywords:  NSURLDownload, Cocoa 

Comment(by chapbr@…):

 One potential issue with the macruby example code is passing 'self' as the
 delegate to the NSURLDownload instance.  Maybe it's supposed to work, but
 since the delegate methods are defined in the top level namespace, I
 wasn't sure what the self instance actually refers to (?):

 $ macruby -e 'p self' # => main
 $ macruby -e 'p self.class' #=> TopLevel

 I modified the gist example code to move the delegate methods inside of a
 Test class and then passed an instance of that class as the delegate to
 NSURLDownload.  The new version no longer crashes during download:


Ticket URL: <http://www.macruby.org/trac/ticket/540#comment:2>
MacRuby <http://macruby.org/>

More information about the MacRuby-devel mailing list