RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

Ruby & (Ampersand) Parameter Demystified

Recently I was asked a question about ‘& parameters’ when you define and/or call methods which take a block. When do you put an ampersand in front of block variables and when do you not? It is often hard to remember how confusing Ruby can be when you’re starting out. So, let’s dig into this a little more deeply and shed some light on what’s going on.

Comments

Post a Comment

Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escalating spam problem. Sorry!