[ruby-core:127292] [Ruby Bug#22491] The number of captures may change depending on the encoding of the target string