re.c: consider name encoding

* re.c (match_aref, rb_reg_regsub): consider encoding of captured
  names, encoding-incompatible should not match.
  [ruby-dev:48278] [Bug #9903]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix typo [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e