From: SonOfLilit Date: 2007-03-28T17:42:14+09:00 Subject: Re: general question (different between methods and functions)? Methods are associated with a receiver object. Functions are not. The only things you can call functions in Ruby are lambdas, blocks, ... Even then it's not clear whether they are methods or functions. Everything else is methods. AFAIK. Aur On 3/28/07, Yamal Khaled Soueidan wrote: > Hello everyone, > > I have been discussing the difference between methods and functions with a > friend, but we couldn't agree on what method and function is? > > I would be very glad if people can join us. > At the moment we have 2 definition for the names. > > 1. first, both names are the same, you can use whatever you want, they refer > to the same thing. > > 2. functions is used outside class, so you can call them direct, they are > global functions, whereas methods are inside classes, and you cannot call > them direct without creating object of that class which have the methods. > > What do you agree on, or what do you have in mind, when you hear function or > method? > > and Thanks :) >