Bug #18160
closed
IndexError raised from MatchData#{offset,begin,end} does not keep the encoding of the argument
Added by nobu (Nobuyoshi Nakada) over 3 years ago.
Updated about 3 years ago.
Description
m = /.*/.match("foo")
m.offset("\u{3042}") rescue p $!.message
#=> "undefined group name reference: \xE3\x81\x82"
- Status changed from Open to Closed
- 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.
- 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.
Also available in: Atom
PDF
Like0
Like0Like0Like0