apparently nums are freezable

This commit is contained in:
Thomas Reynolds 2014-08-24 18:30:14 -07:00
parent 5c18b85a8e
commit df22160173

View file

@ -23,7 +23,7 @@ if ENV['TEST'] || ENV['CONTRACTS'] == 'true'
end
def valid?(val)
(val.frozen? || val.nil?) && Contract.valid?(val, @contract)
(val.frozen? || val.nil? || [::TrueClass, ::FalseClass, ::Fixnum].include?(val.class)) && Contract.valid?(val, @contract)
end
end