A method collision occurs when libraries alter the same core method with incompatible behavior or interfaces. Ruby permits these overrides, but later definitions can change existing callers unexpectedly. section 13.2.3
Conflicting to_s overrides
Active Support once added optional-argument behavior to Time#to_s. Another library could override the same method differently, producing an argument error or changed semantics. The risk is uncommon but cannot be eliminated completely. section 13.2.3
class String
alias __old_reverse__ reverse
def reverse
$stderr.puts "Reversing a string!"
__old_reverse__
end
end
puts "David".reverse
An alias preserves the original method before an override layers on additional behavior; the same mechanism can create collisions when multiple libraries redefine a method. section 13.2.3
Reduce collisions by understanding every loaded library, avoiding unnecessary core-class changes, and testing interactions sufficiently. Overrides can also disable Ruby optimizations, turning compatibility changes into performance liabilities. section 13.2.3
