1.upto(9) { |x| print x }
Why won\'t this work?
{ print x |x} }
What about y?
y
The vertical lines are use to denote parameters to the block. The block is the code enclosed within { }. This is really the syntax of the ruby block, parameters to the block and then the code.