1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

enc: fundamental encindex

* enc/{ascii,us_ascii,utf_8}.c: set encoding indexes of
  fundamental built-in encodings so that usable as well as
  allocated rb_encoding before rb_enc_init().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-09-15 05:49:52 +00:00
parent 078b6c9838
commit 75a1d33bcf
5 changed files with 23 additions and 4 deletions

View file

@ -28,6 +28,10 @@
*/
#include "regenc.h"
#include "encindex.h"
#ifndef ENCINDEX_UTF_8
#define ENCINDEX_UTF_8 0
#endif
#define USE_INVALID_CODE_SCHEME
@ -424,7 +428,7 @@ OnigEncodingDefine(utf_8, UTF_8) = {
get_ctype_code_range,
left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match,
0,
ENCINDEX_UTF_8,
ONIGENC_FLAG_UNICODE,
};
ENC_ALIAS("CP65001", "UTF-8")