From: "usa (Usaku NAKAMURA)" Date: 2021-11-24T10:34:07+00:00 Subject: [ruby-core:106259] [Ruby master Bug#18160] IndexError raised from MatchData#{offset, begin, end} does not keep the encoding of the argument Issue #18160 has been updated by usa (Usaku NAKAMURA). Backport changed from 2.6: REQUIRED, 2.7: REQUIRED, 3.0: DONE to 2.6: REQUIRED, 2.7: DONE, 3.0: DONE ruby_2_7 cd10572b059d07fe236ef9c9db9fd2a8ffc7dd38 merged revision(s) 99d8c4832a7133ca52578d015e3ddcfd94820f4a. ---------------------------------------- Bug #18160: IndexError raised from MatchData#{offset,begin,end} does not keep the encoding of the argument https://bugs.ruby-lang.org/issues/18160#change-94879 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Priority: Normal * Backport: 2.6: REQUIRED, 2.7: DONE, 3.0: DONE ---------------------------------------- ```ruby m = /.*/.match("foo") m.offset("\u{3042}") rescue p $!.message #=> "undefined group name reference: \xE3\x81\x82" ``` -- https://bugs.ruby-lang.org/ Unsubscribe: