Permalink
Browse files

assert.rb: enable for non-$DEBUG

  • Loading branch information...
1 parent af9daed commit 261c968020be2d5757531fb81631fa29407a2d0d @quix committed Jul 17, 2009
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/quix/assert.rb
View
@@ -7,12 +7,9 @@ class AssertionFailed < StandardError
module_function
def assert(&block)
- if $DEBUG
- expression = block.call.strip
- unless eval(expression, block.binding)
- raise AssertionFailed,
- "assertion failed: `#{expression}'"
- end
+ expression = block.call.strip
+ unless eval(expression, block.binding)
+ raise AssertionFailed, "assertion failed: `#{expression}'"
end
end
end

0 comments on commit 261c968

Please sign in to comment.