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)