Local Variable Scope in Ruby and How to Get Around It

Scoping out your local variables

About the screencast

Any serious Ruby developer has to understand what the scope is and how relates to variables. However, did you know that local variables can actually be smuggled between scopes easily using metaprogramming tricks? This video explain how to achieve this! You’ll also learn how to execute arbitrary code in the context of an object and the differences between instance_eval and instance_exec.

  • Published Date October 2015


Have your say! or become a member now to take part in the discussion