-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For Ruby oneof fields, generate hazzers for members (#11655)
When generating Ruby clients for proto3 messages that have a oneof, we generate a hazzer for members of the oneof, not just a hazzer for the oneof itself. In other words, for a proto like this: ``` syntax = "proto3"; message Foo { oneof bar { string baz = 1; } } ``` The generated `Foo` will now have a method called `has_baz?`, in addition to the (pre-existing) method `has_bar?`. I updated the unit tests, and verified that all the tests under `//ruby/...` pass. Fixes #9561. Closes #11655 COPYBARA_INTEGRATE_REVIEW=#11655 from shaldengeki:test-ruby-oneof-hazzer a15e474 FUTURE_COPYBARA_INTEGRATE_REVIEW=#11655 from shaldengeki:test-ruby-oneof-hazzer a15e474 PiperOrigin-RevId: 506032769
- Loading branch information
1 parent
72bf2ea
commit cccc1cd
Showing
3 changed files
with
17 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters