There is no such thing as a global method (in Ruby)
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 applies to many seemingly “top-level” methods documented as belonging to the Kernel module, even as base as puts (print a string), require (load code fr...
Read more at zverok.space