aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-02 08:22:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-02 08:22:47 +0000
commit58919a4da91768367e4bb172df2ea4c9834c5eec (patch)
tree30809c94a6607c038383fe695aa4a757d1ef2291 /re.c
parent14dfdb5eaf2f4004fa0b08b0a1888e40e1ba5bc4 (diff)
downloadruby-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/re.c b/re.c
index 4731462d88..e5cc79d445 100644
--- a/re.c
+++ b/re.c
@@ -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();