Monday, November 21, 2005

Do With

Another small gold nugget by Dave Astels:
one = ['a', 'b', 'c']
other = ['x', 'y', 'z']
one.do_with(other) { | a, b | puts a + b }
very nice and readable. 

I think I am going to add Dave to my Links menu.




Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?