Question from the Ruby test

How to create a block in Ruby