The call Proc.newcreates a closure for the block it gave. When creating a closure for a block, the block is tied to the source variables in the call area Proc.new.
Why is this done?
It allows Ruby blocks to function as closures. Closing is extremely useful, and the Wikipedia entry (linked above) does a great job explaining some of their applications.
How it's done?
Ruby VM ( C), Ruby, Proc.new. . , . Ruby 1.8 proc_alloc eval.c. Ruby 1.9 proc_new proc.c.