O'Reilly Programming Blog: Blocks and File.open
This will be the last post in the series for my in-depth look at Ruby blocks: Why Ruby Blocks Exist part III: Never forget to clean up again!. It shows how blocks can ensure you never have to worry about de-allocating resources like network connections and file handles. If you’re new to Ruby and struggling with blocks, this will be a good read for you.
Post a comment