Skip to content

Commit

Permalink
Bug fix for .holidays with ruby 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
billaul committed May 3, 2021
1 parent b421be3 commit 149b7f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/active_period/has_many/holidays.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module HasMany
module Holidays
include ActivePeriod::HasMany

def holidays(...)
def holidays(*args, &block)
raise I18n.t(:gem_require, scope: %i[active_period holiday_period]) unless Object.const_defined?('Holidays')
ActivePeriod::Collection::HolidayPeriod.new(ActivePeriod::Holiday, self, ...)
ActivePeriod::Collection::HolidayPeriod.new(ActivePeriod::Holiday, self, *args, &block)
end
end
end
Expand Down

0 comments on commit 149b7f0

Please sign in to comment.