matches top right on ruby 3.1, but just top on 3.2.
The previous regexp looked something like /((top|right)\s*){1,2}/ to match 1 or 2 positions separated by optional whitespace.
This updates it to /((top|right)\s+(top|right))|(top|right)/, which seems to give consistent matching behaviour between ruby 3.1 & 3.2
For reasons I've not been smart enough to figure out, there's a difference in matching between 3.1 and 3.2
matches
top right
on ruby 3.1, but justtop
on 3.2.The previous regexp looked something like
/((top|right)\s*){1,2}/
to match 1 or 2 positions separated by optional whitespace. This updates it to/((top|right)\s+(top|right))|(top|right)/
, which seems to give consistent matching behaviour between ruby 3.1 & 3.2Pre-Merge Checklist