Hi,

In message "[ruby-talk:00871] call with a Proc"
    on 99/10/28, Clemens Hintze <c.hintze / gmx.net> writes:

|As the methods 'proc', 'lambda' and 'Proc.new' will takes a block, and
|converts it into a 'Proc' instance, they *consume* that block! There
|is no block afterwards!!!

Hmm, that's inaccurate.  Every methods consume the block given to
them.  In this case:

|   b.list(..., Proc.new{ <do something> });

the block { <do something> } is passed to Proc.new only, no other
method invocation receives that block.  An method which is block
unaware is silently ignore block.

In fact, the Proc making methods (proc, lambda, Proc.new) do not
consume the block.  For exapmle,

   def foo
     p lambda
     p lambda
   end
   foo{p 5}

gives

  #<Proc:0x401f0d50>
  #<Proc:0x401f0d14>

that means two distinct Proc object from same block are generated.

                                                        matz.