Re: Yield should be renamed call_block



This is why if you ever want to pass a given block
to another method, you must capture it in a block argument, and also why
yielding to a block is much faster than calling a proc (since there's
less overhead in yielding than in calling a free-standing proc).

def thrice()
3.times { yield }
end

thrice { puts "Hello World!" }
# >> Hello World!
# >> Hello World!
# >> Hello World!

That doesn't have any impact on your original argument though. You
can't reimplement yield in Ruby with the reflection it offers right
now.


.



Relevant Pages

  • Re: Passing a named function instead of a code block?
    ... grab a method as an object without calling it, ... :square1 is an atomic unit representing the symbol whose ... we call square1 and cast the result of that using '&'. ... '&square2' is fine as square2 is just a variable referring to a proc. ...
    (comp.lang.ruby)
  • SQL Task Error in proc not detected?
    ... I have a package calling a stored proc PROC1, ... proc PROC2, ...
    (microsoft.public.sqlserver.dts)
  • Re: Using output variables
    ... The problem lies in the Web page that calling ... DECLARE @permission int ... EXEC GetPermissions @PID,@UserID,@permission OUTPUT ... > I have the Page calling the stored proc and the proc ...
    (microsoft.public.sqlserver.programming)
  • Re: Clearing the pending results
    ... First, how are you calling this, with a cmd.Executexxx method? ... .NextResult three times, then your while dr.Read(0 will reference the last ... proc definitions...I'd mainly need to know about what the procs are ... > I have a stored procedure. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Table Locking
    ... "Thomas" wrote in message ... > I mean locking the entire table, till the end of the running of the procedure, I am calling some other procedure within this proc. ...
    (microsoft.public.sqlserver.programming)