From 424e961be776d9918f39660d43439fc1973f680e Mon Sep 17 00:00:00 2001 From: John Gesimondo Date: Mon, 11 Jul 2016 20:48:56 -0700 Subject: Raise ArgumentError for bad strptime arguments --- activesupport/lib/active_support/values/time_zone.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support/values/time_zone.rb') diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 19420cee5e..eb89a6d4c5 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -447,6 +447,7 @@ module ActiveSupport private def parts_to_time(parts, now) + raise ArgumentError, "invalid date" if parts.nil? return if parts.empty? time = Time.new( -- cgit v1.2.3