From: Patrick Li Date: 2008-09-01T11:15:40+09:00 Subject: Re: instance_eval/class_eval including/extending modules I must say that I also find the difference between instance_eval/class_eval and include/extend extremely confusing. If someone clearly knows the fundamental rules, please please share. Here's my understanding: def myMethod; end -creates a method "myMethod" callable by instances of self. Here's a list of situations that I'm having trouble with: 1) class Klass def myMethod; end end -self is equal to Klass -so myMethod() is callable by Klass.new 2) Klass.instance_eval {def myMethod; end} -self is equal to Klass -so myMethod() is callable by Klass.new <-- this isn't true What's wrong with my understanding? I think I'm not understanding def correctly. -- Posted via http://www.ruby-forum.com/.