From 09bb30870b43feb967740842c3046372327b796b Mon Sep 17 00:00:00 2001 From: cremno Date: Thu, 2 Jan 2014 06:36:29 +0100 Subject: tiny word boxing optimization --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index 1c577188e..d00d9423a 100644 --- a/src/string.c +++ b/src/string.c @@ -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 { -- cgit v1.2.3