lib/ae/subjunctive.rb in ae-1.3.0 vs lib/ae/subjunctive.rb in ae-1.4.0
- old
+ new
@@ -18,11 +18,11 @@
#
# 5.should.be Numeric
#
def be(*args, &block)
return self if args.empty? && !block
- block = args.shift if !block_given? && Proc === args.first
+ block = args.shift if !block_given? && ::Proc === args.first
if block
pass = block.arity > 0 ? block.call(@delegate) : block.call #@delegate.instance_eval(&block)
msg = args.shift || @message || block.inspect
else
pass = args.shift.equate?(@delegate)
@@ -41,11 +41,11 @@
# The indefinite article is like #be, excpet that it compares a lone argument
# with #case?, rather than #equate?
#
def a(*args, &block)
return self if args.empty? && !block
- block = args.shift if !block_given? && Proc === args.first
+ block = args.shift if !block_given? && ::Proc === args.first
if block
pass = block.arity > 0 ? block.call(@delegate) : block.call #@delegate.instance_eval(&block)
msg = args.shift || @message || block.inspect
else
pass = (args.shift === @delegate) # case equality
@@ -58,9 +58,9 @@
end
end#module AE
class Assertor
- include AE::Subjunctive
+ include ::AE::Subjunctive
end
# Copyright (c) 2008,2009 Thomas Sawyer