"Mauricio Fern?ndez" <batsman.geo / yahoo.com> schrieb im Newsbeitrag
news:20030327090007.GC902 / student.ei.uni-stuttgart.de...
> ahah, I was thinking the other way around, sorry :-)
> Something like "how do I call a proc the same way as a method
(downcase)?"
> ie., some way to do
>   pp = proc { |x| x + 1 }
>   .... MAGIC ....
>   pp(1)

I think you can't other than something like

@pp = proc { |x| x + 1 }

def pp(*args)
 @pp.call(*args)
end

pp(1)

The reason is that ruby tries to find a method "pp" in the current
instance if you directly issue pp(1).

regards

    robert