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

fix feature name and removed a duplicate condition

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-06-28 09:59:35 +00:00
parent d0fb73a0f0
commit efd36e7104

View file

@ -173,9 +173,7 @@ static VALUE encoding_spec_rb_enc_get_index(VALUE self, VALUE obj) {
}
#endif
#if defined(HAVE_RB_ENC_SET_INDEX) \
&& defined(HAVE_RB_ENC_FIND_INDEX) \
&& defined(HAVE_RB_ENC_FIND_INDEX)
#if defined(HAVE_RB_ENC_SET_INDEX) && defined(HAVE_RB_ENC_FROM_INDEX)
static VALUE encoding_spec_rb_enc_set_index(VALUE self, VALUE obj, VALUE index) {
int i = NUM2INT(index);
@ -376,9 +374,7 @@ void Init_encoding_spec(void) {
rb_define_method(cls, "rb_enc_get_index", encoding_spec_rb_enc_get_index, 1);
#endif
#if defined(HAVE_RB_ENC_SET_INDEX) \
&& defined(HAVE_RB_ENC_FIND_INDEX) \
&& defined(HAVE_RB_ENC_FIND_INDEX)
#if defined(HAVE_RB_ENC_SET_INDEX) && defined(HAVE_RB_ENC_FROM_INDEX)
rb_define_method(cls, "rb_enc_set_index", encoding_spec_rb_enc_set_index, 2);
#endif