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

Fix ruby has_...? method #19731

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

ntkme
Copy link
Contributor

@ntkme ntkme commented Dec 18, 2024

@ntkme ntkme requested a review from a team as a code owner December 18, 2024 19:36
@ntkme ntkme requested review from JasonLunn and removed request for a team December 18, 2024 19:36
@zhangskz zhangskz added jruby Issues unique to the JRuby interpreter ruby labels Dec 18, 2024
@JasonLunn JasonLunn added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Dec 20, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Dec 20, 2024
@JasonLunn
Copy link
Contributor

Thanks for the PR! Can you add a regression test that fails without this fix?

Comment on lines +52 to +54
m = TestMessage.decode(TestMessage.encode(m))
assert m.has_optional_int32?
assert TestMessage.descriptor.lookup('optional_int32').has?(m)
Copy link
Contributor Author

@ntkme ntkme Dec 20, 2024

Choose a reason for hiding this comment

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

@JasonLunn Regression test added, specifically, the highlighted lines here are failing on jruby without the patch.

@JasonLunn JasonLunn added 🅰️ safe for tests Mark a commit as safe to run presubmits over and removed wait for user action labels Dec 20, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Dec 20, 2024
@colinbendell
Copy link

Thanks for putting the PR together! I had it on my "holiday TODO" list!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jruby Issues unique to the JRuby interpreter ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ruby] optional field's presence checker method has_...? is broken on JRuby and has cosmetic issue on MRI
4 participants