Files
developer-roadmap/roadmaps/ruby/content/blocks@DzolktV1UUCdSWqmqWgV3.md
T
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

1.1 KiB

Blocks

Blocks are chunks of code that can be passed to methods as if they were arguments. They are defined using either do...end or curly braces {}. Blocks are not objects themselves, but they can be converted into objects called Procs. Methods can then execute the code within the block using the yield keyword. Blocks are a fundamental part of Ruby's expressiveness, allowing for powerful iteration and control flow patterns.

Visit the following resources to learn more: