using the .each iterator instead of a for loop.  you pass an iterator a block telling it what to do.
blocks can be passed to iterators using do or {}.  a cool array thing is some_array.each_index {|i| some_array[i} +=1} and it will change the value of the array as you iterate over it.  very neat.
ok, when passing in parameters to a block, you can also specify local variables do |value; square| square is a local variable b/c it is after the semicolon.  This way it doesn't affect otehr variables in the same scope outside of teh block.  so if you want to affect an outside variable just do normal, if you want to have local variables, define them here
the yield statement is the basic way to call a block of code that gets sent to a method.  I'm guessing this is how all the other methods, like .each, implement their unique functionality.
ok, not only can you pass a block of code to a function, and then have that function call it with yield, you can also define that block of code to have a parameter, and the function can then pass parameters to the block simply by doing yield param1 param2 etc.  (not sure if you need a comma seperated)
you can define new methods for classes, such as Array, and you can pass them blocks of code, such as {|v| v*v > 30}, and in this example it will return true or false, and then you can sort by this parameter.  So a block of code can be passed in to sort things, amount many other uses.
the .collect and .map iterators are the same.  they take a block and return an array of values for each item in the original array corresponding to the outcome of the block passed in.
with the File.open command you can use ../ to go up a directory.  f.each do |line| blah blah so much easier f.each {|line| puts #{line}}
.each_with_index {|value, index| puts value, index} gives you the value first and then the index number of that value of the number of times the block has been called (not actually an index of anything other than how many times block has been called)
interesting little look at the inject method, which can apply a block to a sequence of elements and retain the result.  not sure where I would use it, but cool to think about.
enumerator class is used for implementing external iterators in ruby.
ruby has a method called loop that does nothing but repeatedly call it's block.  it breaks on some condition.  it is also smart when using an enumerator object, when it runs out of objects it terminates cleanly.
cleaning up before dinner