On Tue, Sep 11, 2012 at 12:31 PM, bernhard stoecker
<[email protected]> wrote:
> my problem is, that i have to hand over the block given to variance to
> the mean method. is this possible and if yes how?

You can reference the block passed to the current method with & and
also use that notation to forward it to another method:

def m1(a,b,c,d, &bl)
  m2(x, y, z, &bl)
end

def m2
  yield 1
end

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to