# File lib/once.rb, line 23
def once var, &block
  begin
    result = eval(var, block.binding)
  rescue NameError
    result = false
  end
  if not result
    eval(var + " = true", block.binding)
    yield
    true
  else
    false
  end
end