Use more idiomatic Ruby in a couple of places for consistency

[#56447064]
Merge 56447064-more-reuse to master

[Completes #56447064]