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

Date._<format>(nil) should return an empty Hash #40

Merged
merged 2 commits into from Nov 16, 2021

Conversation

casperisfine
Copy link

Fix: #39

This is how versions previous to 3.2.1 behaved and Active Support
currently rely on this behavior.

https://github.com/rails/rails/blob/90357af08048ef5076730505f6e7b14a81f33d0c/activesupport/lib/active_support/values/time_zone.rb#L383-L384

Any Rails application upgrading to date 3.2.1 might run into unexpected errors.

Fix: ruby#39

This is how versions previous to 3.2.1 behaved and Active Support
currently rely on this behavior.

https://github.com/rails/rails/blob/90357af08048ef5076730505f6e7b14a81f33d0c/activesupport/lib/active_support/values/time_zone.rb#L383-L384

Any Rails application upgrading to date `3.2.1` might run into unexpected errors.
@mame
Copy link
Member

mame commented Nov 15, 2021

Thanks, I will merge this soon. I will make a new release in a few days

@wwahammy
Copy link

@casperisfine thanks for the PR! Does this also address the problem in 2.0.1 or just the 3.2.1 version?

@casperisfine
Copy link
Author

@wwahammy just 3.2.1, but I assume the change was the same on the other version and it only need to be cherry-picked on these old branches.

@casperisfine
Copy link
Author

I pushed a second commit to also handle Date._<format>(<symbol>).

In could have been a different PR, but since the fix is in the same place, the merge would have bene messy.

@mame mame merged commit d034d92 into ruby:master Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Date._iso8601 regression following the 3.2.1 security fix
4 participants