Created
June 25, 2012 08:26
-
-
Save zlw/2987361 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
class Post | |
def comment=(val) | |
comment = val | |
self.comment | |
end | |
end | |
comment = Post.new | |
comment.comment = 'My Comment' | |
# post.rb:4:in `comment=': undefined method `comment' for #<Post:0x007fc46307ca68> (NoMethodError) | |
# from post.rb:9:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment