There is no such thing as a global method (in Ruby)

from blog zverok's space, | ↗ original
What Ruby’s top-level methods actually are, who they belong to and how they are namespaced. A few days ago, a curious question was asked on /r/ruby, which can be boiled down to this: How are the methods of the Kernel module available in the top-level scope? The question was dedicated to rand method, but (as the author correctly suggests) it also...