lib/active_model/validations/numericality.rb in activemodel-4.2.0.beta3 vs lib/active_model/validations/numericality.rb in activemodel-4.2.0.beta4
- old
+ new
@@ -65,10 +65,10 @@
rescue ArgumentError, TypeError
nil
end
def parse_raw_value_as_an_integer(raw_value)
- raw_value.to_i if raw_value.to_s =~ /\A[+-]?\d+\Z/
+ raw_value.to_i if raw_value.to_s =~ /\A[+-]?\d+\z/
end
def filtered_options(value)
filtered = options.except(*RESERVED_OPTIONS)
filtered[:value] = value