From 4a4e463df0584f9d3355445b3c171f50b1c8890e Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Tue, 23 Feb 2021 09:16:27 +0200 Subject: [PATCH] Fixed typo that stops the ArgumentError if @options[:on] is missing --- lib/recurrence/event/yearly.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/recurrence/event/yearly.rb b/lib/recurrence/event/yearly.rb index eab5ba0..c7ca6f4 100644 --- a/lib/recurrence/event/yearly.rb +++ b/lib/recurrence/event/yearly.rb @@ -19,7 +19,7 @@ class Yearly < Base # :nodoc: all }.freeze private def validate - valid_month_day?(@options[:on].last) + valid_month_day?(@options[:on]&.last) if @options[:on].first.is_a?(Numeric) valid_month?(@options[:on].first)