Skip to content

Instantly share code, notes, and snippets.


jayrobin/global_scope.rb Secret

Created Oct 11, 2016
What would you like to do?
def some_method
# this method is in the global scope and therefore is added to ‘Object’
class MyClass
puts MyClass.private_methods.include?(:some_method) # true
my_class =
puts my_class.private_methods.include?(:some_method) # true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.