diff --git a/string.c b/string.c index 3bd6c74b35..36126eb805 100644 --- a/string.c +++ b/string.c @@ -4724,7 +4724,7 @@ rb_str_aset(VALUE str, VALUE indx, VALUE val) } if (SPECIAL_CONST_P(indx)) goto generic; - switch (TYPE(indx)) { + switch (BUILTIN_TYPE(indx)) { case T_REGEXP: rb_str_subpat_set(str, indx, INT2FIX(0), val); return val; @@ -9628,14 +9628,11 @@ rb_str_start_with(int argc, VALUE *argv, VALUE str) for (i=0; i