summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorcremno <[email protected]>2014-01-02 06:36:29 +0100
committercremno <[email protected]>2014-01-02 06:36:29 +0100
commit09bb30870b43feb967740842c3046372327b796b (patch)
tree1a22be2bab4c9f46d48e361bc78a9f933c8d5e02 /src/string.c
parente8dd8180baae425c893e1054368a4c32c99ea805 (diff)
downloadmruby-09bb30870b43feb967740842c3046372327b796b.tar.gz
mruby-09bb30870b43feb967740842c3046372327b796b.zip
tiny word boxing optimization
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
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 {