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:
parent
66b7eb1927
commit
5742f12b78
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ module ActiveModel
|
||||||
keys.each do |key|
|
keys.each do |key|
|
||||||
value = options[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"
|
raise ArgumentError, ":#{key} must be a nonnegative Integer or Infinity"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue