[ruby-core:126850] [Ruby Bug#22381] MatchData assigned to $~ is incorrectly reused