Skip to content

Log Range as string representation rather than array#223

Merged
bcardiff merged 1 commit intocrystal-lang:masterfrom
mamantoha:log-range-as-string
Nov 19, 2025
Merged

Log Range as string representation rather than array#223
bcardiff merged 1 commit intocrystal-lang:masterfrom
mamantoha:log-range-as-string

Conversation

@mamantoha
Copy link
Copy Markdown
Contributor

Discovered while implementing support for PostgreSQL ranges in will/crystal-pg#304.

I encountered an issue where Range arguments containing Time objects would cause logging failures:

(Time.utc(2016, 2, 15, 10, 20, 30)..Time.utc(2017, 2, 15, 10, 20, 30)).to_a
# Error: undefined method 'succ' for Time

The existing MetadataValueConverter.arg_to_log(arg : Enumerable) method attempts to convert ranges to an array, which fails for Time ranges.

@bcardiff bcardiff merged commit 29a201c into crystal-lang:master Nov 19, 2025
jgaskins pushed a commit to jgaskins/crystal-db that referenced this pull request Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants