Actions
Bug #9903
closedRegexp#[] doesn't consider capture name encoding
Bug #9903:
Regexp#[] doesn't consider capture name encoding
Description
Regexp#[]が引数の文字列やシンボルを考慮していません。
key = "\xb1\xb2".force_encoding(Encoding::EUC_JP)
m = /(?<#{key}>.*)/.match("xxx")
p m[key.dup.force_encoding(Encoding::Shift_JIS)]
# => "xxx"
Actions
Like0
Like0Like0Like0