Created
March 23, 2017 05:18
-
-
Save keizo042/fcac043af0723491ba1738040fca5a58 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 Greeding | |
@@hello =nil | |
def self.hello=(word) | |
@@hello = word | |
end | |
def hello | |
@@hello | |
end | |
end | |
Greeding.hello="hello world" | |
puts Greeding.new.hello # expected "hello world" but acutual "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment