assert for Ruby

A little assert mechanism superficially similiar to that in Java and C.

class AssertionFailure < RuntimeError
end

def assert(condition, message)
  unless condition
    raise AssertionFailure, "Assertion failed: #{message}" 
  end
end