Skip to content

Instantly share code, notes, and snippets.

@joshbuddy
Created October 8, 2010 03:37
Show Gist options
  • Save joshbuddy/616321 to your computer and use it in GitHub Desktop.
Save joshbuddy/616321 to your computer and use it in GitHub Desktop.
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
@dkubb
Copy link

dkubb commented Oct 8, 2010

Nice! Where/when is that available?

@joshbuddy
Copy link
Author

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