Does code optimized for RAM usage need to be ugly? Find out, in this free episode of RubyTapas.


[boilerplate bypath=”rubytapas-sample”]

Published by Avdi Grimm

5 Comments

  1. Thanks for helping us keep the code clean and nice!

    I discovered the enumerator-returning functionality by accident the other day when I wanted to create an array of multiple instances of a class.

    First attempt of 2.times { Foo.new } didn’t work as it didn’t return an array. However, 2.times.collect { Foo.new } did the work (I find “collect” alias more expressive than “map” in this case). Another moment when I realized just how much I like working with Ruby.

    Reply
  2. What are you using for inline console in ST2?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *