Skip to content

Conversation

@zverok
Copy link
Contributor

@zverok zverok commented Dec 6, 2022

Same as ruby/ruby#6594, but for Date & DateTime.

@zverok zverok requested a review from jeremyevans December 6, 2022 17:59
@zverok
Copy link
Contributor Author

zverok commented Dec 6, 2022

Hmm, interesting, it seems to only be compilable under 3.2 🤔
Should I surround new code with a version-specific macro?

@jeremyevans
Copy link
Contributor

Sorry that I haven't had a chance to review this yet, I'm currently at RubyConfTH and haven't had a lot of free time. I should be able to review next week.

From a brief review of the build error, you can probably switch from rb_hash_new_capa to just rb_hash_new. Unless you can see a significant performance improvement from using rb_hash_new_capa on 3.2, I would avoid the optimization and keep the code the same for all ruby versions.

@zverok
Copy link
Contributor Author

zverok commented Dec 10, 2022

@jeremyevans Yeah, makes sense. All green now.

Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for working on this. I have some minor requests for changes, then this can be merged.

@zverok zverok requested a review from jeremyevans December 12, 2022 20:52
@zverok zverok merged commit c03663c into ruby:master Dec 13, 2022
@zverok zverok deleted the deconstruct_keys branch December 13, 2022 19:52
matzbot pushed a commit to ruby/ruby that referenced this pull request Dec 19, 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