Videos

RubyHack 2018

Recorded by RubyHack - Video post production by Confreaks

Ever noticed how flexible the use of blocks can make Ruby code? They allow us to reuse code easily, and to dynamically define not only method names but also method bodies, thereby essentially making metaprogramming possible. In this talk we properly define blocks as closures. We discuss scope gates and how blocks manage to get around them, and how lambdas take this even further by allowing us to use variables defined in a different scope from where the lambda is executed inside the lambda body. We also take a look at what goes on in the Ruby stack and heap which makes all of this possible.

Rated: Everyone
Viewed 69 times
Tags: There are no tags for this video.