diff options
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/validations/numericality.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index 1cafb15ac7..c5997283ea 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -98,15 +98,15 @@ module ActiveModel end def is_integer?(raw_value) - INTEGER_REGEX === raw_value.to_s + INTEGER_REGEX.match?(raw_value.to_s) end def is_decimal?(raw_value) - DECIMAL_REGEX === raw_value.to_s + DECIMAL_REGEX.match?(raw_value.to_s) end def is_hexadecimal_literal?(raw_value) - /\A0[xX]/ === raw_value + /\A0[xX]/.match?(raw_value) end def filtered_options(value) |