From: "nagachika (Tomoyuki Chikanaga)" Date: 2021-09-18T07:52:09+00:00 Subject: [ruby-core:105340] [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 nagachika (Tomoyuki Chikanaga). Backport changed from 2.6: REQUIRED, 2.7: REQUIRED, 3.0: REQUIRED to 2.6: REQUIRED, 2.7: REQUIRED, 3.0: DONE ruby_3_0 3e61556191ea7e6586ffb995f03e6d2631ec6fb0 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-93754 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Priority: Normal * Backport: 2.6: REQUIRED, 2.7: REQUIRED, 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: