That's an older version of geokit-rails/geokit, now the definition is:
def closest(options = {})
by_distance(options).first(1)
end
So no need to override anything, your code could simply say:
MyClass.by_distance(options).limit(my_limit)
Note: Try to avoiding monkey patching existing code. If you did what was suggested in another comment it might work now, but as soon as you update geokit/geokit-rails you risk it breaking as implementations do change (e.g. the closest method is implemented rather differently.