Consider the following contrived examples:

  def func1() 
    ret = []
    t = nil
    5.times do |i|
      t = yield i
      ret << t
    end
    ret
  end

  func1 { |b| b + 10 }  # [ 10, 11, 12, 13, 14 ]

  def func2(&block)
    ret = []
    t = nil
    5.times do |i|
      t = block.call(i)
      ret << t
    end
    ret
  end
  
  func2 { |b| b + 10 } # [ 10, 11, 12, 13, 14 ]

Is this just TMTOWTDI, or is there a difference?

Dan
--
/^Dan Debertin$/
airboss / nodewarrior.org
www.nodewarrior.org
ignorami: n: 
The art of folding problem users into representational shapes.