[SVN] Re: linked_ri.rb: Changes for Ruby 1.9

Charles Turner vze26m98 at optonline.net
Thu Aug 28 20:53:48 UTC 2008


On Thu, 28 Aug 2008 15:13:21 -0500, James Gray wrote:
> On Aug 28, 2008, at 1:35 PM, Charles Turner wrote:
> 
>> This diff file shows the patches I made to get the Ruby bundle support
>> file linked_ri.rb to work with ruby 1.9.0 (2007-12-25 revision 14709)
>> [i686-darwin9.4.0]
> 
> You can't call each_with_index() without a block on Ruby 1.8.

As per your earlier email on the users list, wouldn't something like 
this work?

linked = constants.send(str.respond_to?(:each_with_index) ? 
:each_with_index : :enum_with_index) do |const, i|

>> No attempt to make this code work on previous versions of Ruby.
> 
> This is the main issue with most of these patches.  We just can't ship  
> Ruby code in TextMate that doesn't run on Ruby 1.8.  It has to work  
> there first and support 1.9 as a bonus.

That's understood. I won't bore you with all the reasons why my 
submissions aren't perfect, but they're valid reasons from a personal 
standpoint. At the moment, the choice is whether to share or not, and I 
decided to make this work available. I'm sure someone will appreciate 
it, even as rough as it is.

Best, Charles




More information about the textmate-dev mailing list