Backporting C version of Array.combination to ruby 1.86

I need a speedy version of the Array.combination method. Unfortunately
the C implementation of this method is only available in ruby 1.87
while we are tied to 1.86. Is there a way to backport and monkey
patch the combination method from ruby 1.87 into ruby 1.86. I’ve been
playing with ruby inline but so far no luck. Of course my experience
to C was limited to my college days way back when so it’s no surprise.

thx.

-karl