Passing Proc as a parameter

Hi,
I’m a new user of Ruby, and trying to learn its features. But I have a
difficulty to understand Proc class.
What will be the referencing environment when we pass Proc as a
parameter?
and other question, how can we pass Proc as a parameter, can you give an
example of it?
Thanks for your help.

Pretty good explanation at this blog:

http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods

Thanks for the link, it really helped me to understand the topic.

On Dec 12, 2006, at 6:00 PM, Can Ceran wrote:

Hi,
I’m a new user of Ruby, and trying to learn its features. But I have a
difficulty to understand Proc class.
What will be the referencing environment when we pass Proc as a
parameter?
and other question, how can we pass Proc as a parameter, can you
give an
example of it?

This article might be worth a read:

http://blog.grayproductions.net/articles/2006/01/05/code-as-a-data-type

James Edward G. II