RubyHACK 2018: Ruby Unblocked by Eliza De Jager

336 views · Published 5 July 2018 · 38:14 · Indexed 10 November 2026

Channel: Confreaks · 2018 · Science & Technology

Watch on YouTube

RubyHACK 2018: Ruby Unblocked by Eliza De Jager

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.

More from this channel