Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse string input whenever possible #10

Merged
merged 2 commits into from
May 29, 2022

Conversation

RomanVanLoo
Copy link
Contributor

I'm not sure if this is a behaviour you want, but since a lot of people come from the deprecated time difference gem it might be useful.

when String
begin
Time.parse(value).getutc
rescue

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid rescuing without specifying an error class.

@sourcelevel-bot
Copy link

SourceLevel has finished reviewing this Pull Request and has found:

  • 16 possible new issues (including those that may have been commented here).

See more details about this review.

Copy link
Owner

@excpt excpt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 👍

@excpt excpt merged commit f9c2573 into excpt:master May 29, 2022
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.

2 participants