1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Prefer || over 'or' for boolean operations

This commit is contained in:
Benjamin Quorning 2012-02-22 10:13:27 +01:00
parent 66b7eb1927
commit 5742f12b78

View file

@ -27,7 +27,7 @@ module ActiveModel
keys.each do |key|
value = options[key]
unless value.is_a?(Integer) && value >= 0 or value == Float::INFINITY
unless (value.is_a?(Integer) && value >= 0) || value == Float::INFINITY
raise ArgumentError, ":#{key} must be a nonnegative Integer or Infinity"
end
end