From: 7stud -- Date: 2011-05-13T04:00:02+09:00 Subject: Re: where does the pure method defined when starting irb Christopher Dicely wrote in post #998250: > On Thu, May 12, 2011 at 2:40 AM, Brian Xue wrote: >> >> def hello; end >> =>nil >> >> then where is the method "hello" defined? within Object? but >> >> self.class.instance_methods.include? :hello >> =>false > > Right, because its not defined as an instance method in the Object > class, its defined as an instance method in the singleton class of the > current object (main). > > So, in IRB for Ruby 1.8.7 after the above > > (class < => true > Also: puts RUBY_VERSION x = class A end p x x = class <