[MacRuby] #885: string formatter %-8s with symbol crashes

MacRuby ruby-noreply at macosforge.org
Mon Aug 30 13:42:55 PDT 2010


#885: string formatter %-8s with symbol crashes
-----------------------------------+----------------------------------------
 Reporter:  lsansonetti@…          |       Owner:  lsansonetti@…        
     Type:  defect                 |      Status:  new                  
 Priority:  blocker                |   Milestone:                       
Component:  MacRuby                |    Keywords:                       
-----------------------------------+----------------------------------------
 As of trunk:

 {{{
 $ /usr/local/bin/macruby -e "p '%-8s' % :foo"
 2010-08-30 13:41:19.145 macruby[1859:c03] -[Symbol
 replaceCharactersInRange:withString:]: unrecognized selector sent to
 instance 0x4004c6400
 uncaught Objective-C/C++ exception...
 2010-08-30 13:41:19.147 macruby[1859:c03] *** Terminating app due to
 uncaught exception 'NSInvalidArgumentException', reason: '-[Symbol
 replaceCharactersInRange:withString:]: unrecognized selector sent to
 instance 0x4004c6400'
 *** Call stack at first throw:
 (
         0   CoreFoundation                      0x00007fff82c10226
 __exceptionPreprocess + 198
         1   libobjc.A.dylib                     0x00007fff88812802
 objc_exception_throw + 45
         2   CoreFoundation                      0x00007fff82c87bf5
 -[NSObject doesNotRecognizeSelector:] + 149
         3   CoreFoundation                      0x00007fff82be1d69
 ___forwarding___ + 361
         4   CoreFoundation                      0x00007fff82bde828
 _CF_forwarding_prep_0 + 232
         5   CoreFoundation                      0x00007fff82bc7681
 CFStringReplace + 129
         6   libmacruby.dylib                    0x000000010c316fd0
 rb_str_format + 1360
         7   libmacruby.dylib                    0x000000010c31afa1
 rb_str_intern_fast + 401
         8   libmacruby.dylib                    0x000000010c39aecb
 rb_vm_dispatch + 6651
         9   ???                                 0x000000010db643d0 0x0 +
 4525016016
         10  ???                                 0x000000010db64079 0x0 +
 4525015161
         11  libmacruby.dylib                    0x000000010c3a8118
 rb_vm_run + 488
         12  libmacruby.dylib                    0x000000010c298990
 ruby_run_node + 80
         13  macruby                             0x000000010c267cf8 main +
 152
         14  macruby                             0x000000010c267c54 start +
 52
 )
 terminate called throwing an exceptionAbort trap: 6
 }}}

 Found by playing with the yard tool.

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



More information about the macruby-tickets mailing list