Created
March 21, 2012 11:23
-
-
Save youngbrioche/2146301 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
puts RUBY_VERSION | |
class Foo | |
def info(*args) | |
puts args.inspect | |
end | |
end | |
class Bar < Foo | |
def info(*args) | |
puts "BEFORE" | |
super | |
puts "AFTER" | |
end | |
end | |
Foo.new.info "foo", "bar", "baz" | |
Bar.new.info "foo", "bar", "baz" | |
# 1.8.7 | |
# ["foo", "bar", "baz"] | |
# BEFORE | |
# ["foo", "bar", "baz"] | |
# AFTER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment