Created
April 23, 2017 01:26
-
-
Save fcamel/ede0e2df1fb6cb4b332249dc2366d868 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$ cat a.rb | |
class A | |
def foo | |
return "foo" | |
end | |
end | |
a = A.new | |
print a.foo(), "\n" | |
class A | |
def foo | |
return "bar" | |
end | |
end | |
print a.foo(), "\n" | |
$ ruby a.rb | |
foo | |
bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment