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