Skip to content

Instantly share code, notes, and snippets.

@zlw
Created June 25, 2012 08:26
Show Gist options
  • Save zlw/2987361 to your computer and use it in GitHub Desktop.
Save zlw/2987361 to your computer and use it in GitHub Desktop.
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