Mark J. Reed <mreed / thereeds.org> wrote: > Martin DeMello <martindemello / yahoo.com> writes: > >ajmayo / my-deja.com wrote: > >> evaluate the function with parameter 1, then attempt to print the > >> function itself (which Javascript will do, printing the text of the > >> block) > > >Ruby does not do this. > > More specifically: in Ruby, unlike Python and JavaScript, methods are > *not* variables with closure values. You can persuade Ruby to turn a > method into a closure value, but that's not how they live, and methods > do not occupy variable namespace. So defining a method 'foo' does not > have any affect on the variable > 'foo', or vice versa: Actually, what I meant was that ruby does not store the source code of the method anywhere, so it cannot be introspected. martin