-
Notifications
You must be signed in to change notification settings - Fork 219
Open
Description
Hey,
Just wondering if it would make sense to submit a PR for this use case.
I experienced a weird app error and the app ended up calling business_days_until(x)
with x being nil.
This produces an unhandled infinite loop because calling that nil generates an infinite range inside the business_time gem, and calling each
... well... crashes everything. The docker containers running the app started being restarted for a simple data error.
Line where the nil to_date
parameter could be checked:
if inclusive |
I understand that it's a fault at the app level, but I'd prefer the library rejects a nil that would never work.
Most probably other funcitions in the gem are affected by the same issue.
Happy to submit a PR, but wanted to check if it makes sense.
Thanks!
wacko and rcantore
Metadata
Metadata
Assignees
Labels
No labels