Created
October 8, 2010 03:37
-
-
Save joshbuddy/616321 to your computer and use it in GitHub Desktop.
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
module Foo | |
def foo | |
p :before | |
super | |
p :after | |
end | |
end | |
class Bar | |
def foo | |
p :foo | |
end | |
prepend Foo | |
end | |
Bar.new.foo # :before, :foo, :after |
This is Ruby 2.0 that Matz just showed off.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice! Where/when is that available?