Created
August 30, 2015 23:54
-
-
Save zobar/f43cc5fca42d2e0ae6c7 to your computer and use it in GitHub Desktop.
Nested function definitions are a bad idea in Ruby.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -w | |
def defit | |
def ohai | |
puts "hello from #{self.class.inspect} #{self.inspect}" | |
end | |
puts "called defit in #{self.class.inspect} #{self.inspect}" | |
end | |
module MyModule | |
defit | |
end | |
:whatever.ohai |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment