RubyFlow The Ruby and Rails community linklog

Using Ruby Blocks And Rolling Your Own Iterators

I recently covered Ruby block basics in my post, More Advanced Ruby Method Arguments – Hashes And Block Basics. I mentioned that blocks are not really method arguments and also covered the two different types of block syntax. Towards the end of that post I promised to examine Ruby blocks more deeply and I am going to do that here. In my opinion there are several interesting things about blocks…

Comments

Great post. Comming from a non-ruby background, blocks have been a source of confusion for me. This post clears some of that confusion up. Thanks!

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in