The first one creates a class method as opposed to the second one that creates an instance method (e.g., Foo.bar rather than x = Foo.new; x.bar;). :) --Jeremy On 6/12/07, iskaldur <iskaldur / gmail.com> wrote: > Is there any difference between using self in a method name, and not > using it? > For example, I've seen a lot something like > > class Foo > def self.bar > ... > end > end > > Is this the same thing as > > class Foo > def bar > ... > end > end > ? > > -- > Posted via http://www.ruby-forum.com/. > > -- http://www.jeremymcanally.com/ My free Ruby e-book: http://www.humblelittlerubybook.com/book/ My blogs: http://www.mrneighborly.com/ http://www.rubyinpractice.com/