diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-02 08:22:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-02 08:22:47 +0000 |
commit | 58919a4da91768367e4bb172df2ea4c9834c5eec (patch) | |
tree | 30809c94a6607c038383fe695aa4a757d1ef2291 /re.c | |
parent | 14dfdb5eaf2f4004fa0b08b0a1888e40e1ba5bc4 (diff) | |
download | ruby-58919a4da91768367e4bb172df2ea4c9834c5eec.tar.gz |
re.c: use built-in encoding indexes
* internal.h: add EUC-JP and Windows-31J.
* re.c (rb_char_to_option_kcode): use built-in encoding indexes in
internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -307,10 +307,10 @@ rb_char_to_option_kcode(int c, int *option, int *kcode) *kcode = rb_ascii8bit_encindex(); return (*option = ARG_ENCODING_NONE); case 'e': - *kcode = rb_enc_find_index("EUC-JP"); + *kcode = ENCINDEX_EUC_JP; break; case 's': - *kcode = rb_enc_find_index("Windows-31J"); + *kcode = ENCINDEX_Windows_31J; break; case 'u': *kcode = rb_utf8_encindex(); |