We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 66b7eb1 + 5742f12 commit a95f730Copy full SHA for a95f730
activemodel/lib/active_model/validations/length.rb
@@ -27,7 +27,7 @@ def check_validity!
27
keys.each do |key|
28
value = options[key]
29
30
- unless value.is_a?(Integer) && value >= 0 or value == Float::INFINITY
+ unless (value.is_a?(Integer) && value >= 0) || value == Float::INFINITY
31
raise ArgumentError, ":#{key} must be a nonnegative Integer or Infinity"
32
end
33
0 commit comments