Unfortunately there is: https://github.com/ruby/ruby/blob/ruby_1_9_3/vm_method.c#L178 and https://github.com/ruby/ruby/blob/ruby_2_0_0/vm_method.c#L245.
I'm reworking this a bit to cover 1.9 and 2.0 fully.