[TxMt] Ruby "Run Script" and RubyCocoa

Allan Odgaard throw-away-1 at macromates.com
Fri Jun 23 01:26:55 UTC 2006


On 23/6/2006, at 3:10, Chris Thomas wrote:

>> So I did not do any compiling at all. And it does run just fine  
>> from the command line.
> FWIW, it works here with the latest RubyMate, but I'm using Ruby  
> 1.8.4_2 from DarwinPorts and I built rubycocoa from the latest CVS  
> source.

Turns out the problem is that when assigning to $0/$PROGRAM_NAME Ruby  
will put that as argv[0] and put NULL in the rest of the slots --  
this is done so that ‘ps’ etc. will show the new name in the process  
listing.

Unfortunately some of the code involved in loading cocoaruby does  
strcmp etc. on argv values, and thus the crash.

Haris found a thread on ruby-talk which discussed the problem, and it  
may have been worked around for 1.8.4.

An ambitious remaking of RubyMate is now in progress, so we can  
supply the proper script name… :)




More information about the textmate mailing list