Skip to content

Instantly share code, notes, and snippets.

@kstratis
Created October 18, 2017 09:29
Show Gist options
  • Save kstratis/1b86ce96f0e241714894c04ba77ee813 to your computer and use it in GitHub Desktop.
Save kstratis/1b86ce96f0e241714894c04ba77ee813 to your computer and use it in GitHub Desktop.
Kernel module methods as Object class methods
module Kernel
def say_hello
puts "hello world"
end
end
Object.new.say_hello # => hello world
Object.say_hello # => hello world - Shouldn't be possible!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment