Skip to content

Fix Ruby 3.1+ Date#to_s deprecation warning in ProcResultCache#12

Merged
tob1k merged 1 commit into
shiftcare:holidays-april-16-2025from
tob1k:holidays-april-16-2025-patched
Nov 28, 2025
Merged

Fix Ruby 3.1+ Date#to_s deprecation warning in ProcResultCache#12
tob1k merged 1 commit into
shiftcare:holidays-april-16-2025from
tob1k:holidays-april-16-2025-patched

Conversation

@tob1k
Copy link
Copy Markdown

@tob1k tob1k commented Nov 28, 2025

Summary

Fixes a deprecation warning in Ruby 3.1+ where Date#to_s without a format argument is deprecated.

The build_proc_key method was using function_arguments.join('_') which implicitly calls to_s on Date objects. This now explicitly uses iso8601 for Date arguments, which:

  • Eliminates the deprecation warning
  • Produces consistent, locale-independent cache keys

Changes

  • Modified build_proc_key to explicitly format Date arguments using iso8601
  • Added test to verify Date argument handling

Test Plan

  • Existing tests pass
  • New test added for Date argument formatting

@tob1k tob1k changed the base branch from master to holidays-april-16-2025 November 28, 2025 03:34
@tob1k tob1k merged commit 6609be7 into shiftcare:holidays-april-16-2025 Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant