Last active
November 15, 2016 15:58
-
-
Save DmitryBash/fe7b1a150eae4e0433e26ba042c0de26 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
class C | |
def self.no_dot | |
puts "Self is #{self}" | |
end | |
self.no_dot | |
no_dot | |
end | |
#Не особо понимаю разницу между вызовом просто no_dot и self.no_dot | |
#И так же тут с x и self.x | |
class C | |
def x | |
puts "This is method 'x'" | |
end | |
def y | |
puts "This is method 'y', about to call x without a dot." | |
x | |
self.x | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment