3 ms·
Those only act on the currently defined context. Especially __FUNCTION__ is by no means an equivalent to source_location. __FUNCTION__ tells you, in what func
by bhaak 11y ago
Those only act on the currently defined context.
Especially __FUNCTION__ is by no means an equivalent to source_location.
__FUNCTION__ tells you, in what function you currently are.
source_location tells you "in what file has this method of this object been defined". Because of duck typing this is much harder to answer in Ruby. But even in C, because of linking it can be non obvious what function actually gets called.