3 ms·
> Ruby method calls are syntactic sugar over the send method of Kernel, which basically is the interpreter itself. Technically, the method you are thinking abo
by dragonwriter 8y ago
> Ruby method calls are syntactic sugar over the send method of Kernel, which basically is the interpreter itself.
Technically, the method you are thinking about (for modern Ruby) is __send__; send is (to support legacy code) by default an alias for __send__ but can be overridden without breaking the world (communication-related classes do this sometimes, because send is often a natural name for an action in their domain.)
Redefining __send__ in a class is possible, but quite likely to blow up in interesting ways.