tiny word boxing optimization

This commit is contained in:
cremno
2014-01-02 06:36:29 +01:00
parent e8dd8180ba
commit 09bb30870b
7 changed files with 13 additions and 20 deletions
+1 -1
View File
@@ -1248,7 +1248,7 @@ mrb_str_include(mrb_state *mrb, mrb_value self)
mrb_bool include_p;
mrb_get_args(mrb, "o", &str2);
if (mrb_type(str2) == MRB_TT_FIXNUM) {
if (mrb_fixnum_p(str2)) {
include_p = (memchr(RSTRING_PTR(self), mrb_fixnum(str2), RSTRING_LEN(self)) != NULL);
}
else {