diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-21 00:10:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-21 00:10:36 +0300 |
commit | 3867f4726590bd73909adbc51a71f6399aa1b6dc (patch) | |
tree | 603bd159fc15b9ddb9896aa1e01e38c8957b0990 /lib/gitlab/timeless.rb | |
parent | bca3fb69e1e43c345ccac26a08ae1d374920020d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/timeless.rb')
-rw-r--r-- | lib/gitlab/timeless.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/timeless.rb b/lib/gitlab/timeless.rb index 4f974c98c71..b72d33113dd 100644 --- a/lib/gitlab/timeless.rb +++ b/lib/gitlab/timeless.rb @@ -6,7 +6,8 @@ module Gitlab original_record_timestamps = model.record_timestamps model.record_timestamps = false - if block.arity.abs == 1 + # negative arity means arguments are optional + if block.arity == 1 || block.arity < 0 block.call(model) else block.call |