[SVN] Re: linked_ri.rb: Changes for Ruby 1.9
James Gray
james at grayproductions.net
Thu Aug 28 21:14:58 UTC 2008
On Aug 28, 2008, at 4:10 PM, Charles Turner wrote:
> On Thu, 28 Aug 2008 16:00:37 -0500, James Gray wrote:
>>>
>>> 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|
>>
>> Unfortunately no. 1.8 supports each_with_index() just not the way
>> you
>> are calling it.
>
> Then wouldn't the reverse work, as 1.9 doesn't look like has an
> enum_with_index?
I know it doesn't by default. Is that true after a require
"enumerator" though? I haven't checked.
James Edward Gray II
More information about the textmate-dev
mailing list