feat(ruby): improve bump/widen strategy for ~>
#17091
+285
−132
Merged
~>
#17091