Created
May 15, 2014 20:52
-
-
Save wesdotcool/683d07dbec7fef704e28 to your computer and use it in GitHub Desktop.
What does it prin?
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
class Foo | |
protected | |
def y | |
'world' | |
end | |
end | |
class Bar < Foo | |
def yy | |
y | |
end | |
def self.zz(b) | |
b.y | |
end | |
end | |
b = Bar.new | |
b.yy | |
=> "world" | |
Bar.zz(b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment