lib/ae/assert.rb in ae-1.2.3 vs lib/ae/assert.rb in ae-1.3.0
- old
+ new
@@ -21,16 +21,16 @@
# truthfully, i.e. not as nil or false.
#
# assert{ 4==3 }
#
def assert(*args, &block)
- return Assertor.new(self, :backtrace=>caller).assert(*args, &block)
+ Assertor.new(self, :backtrace=>caller).assert(*args, &block)
end
# Same as 'object.assert == other'.
def assert=(cmp)
- return Assertor.new(self, :backtrace=>caller).assert(*args, &block) == cmp
+ Assertor.new(self, :backtrace=>caller).assert(*args, &block) == cmp
end
# Assert not an operational relationship.
# Read it as "assert not".
#
@@ -41,10 +41,10 @@
# AUHTOR'S NOTE: This method would not be necessary if Ruby would allow
# +!=+ to be define as a method, or at least +!+ as a unary method. This
# may be possible in Ruby 1.9.
#
def assert!(*args, &block)
- return Assertor.new(self, :backtrace=>caller).not(*args, &block)
+ Assertor.new(self, :backtrace=>caller).not.assert(*args, &block)
end
# Alias for #assert!.
#
# 4.refute == 4 #=> Assertion Error