Actions
Bug #18160
closedIndexError raised from MatchData#{offset,begin,end} does not keep the encoding of the argument
    Bug #18160:
    IndexError raised from MatchData#{offset,begin,end} does not keep the encoding of the argument
  
Description
m = /.*/.match("foo")
m.offset("\u{3042}") rescue p $!.message
#=> "undefined group name reference: \xE3\x81\x82"
        
           Updated by nobu (Nobuyoshi Nakada) about 4 years ago
          Updated by nobu (Nobuyoshi Nakada) about 4 years ago
          
          
        
        
      
      - Status changed from Open to Closed
Applied in changeset git|99d8c4832a7133ca52578d015e3ddcfd94820f4a.
Preserve the encoding of the argument in IndexError [Bug #18160]
        
           Updated by nagachika (Tomoyuki Chikanaga) about 4 years ago
          Updated by nagachika (Tomoyuki Chikanaga) about 4 years ago
          
          
        
        
      
      - 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.
        
           Updated by usa (Usaku NAKAMURA) almost 4 years ago
          Updated by usa (Usaku NAKAMURA) almost 4 years ago
          
          
        
        
      
      - 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.
Actions