summaryrefslogtreecommitdiffhomepage
path: root/src/object.c
diff options
context:
space:
mode:
authorksss <[email protected]>2014-03-05 15:06:29 +0000
committerksss <[email protected]>2014-03-06 13:47:51 +0000
commit54132e436494b4797ca53cbd934963e7d752ac42 (patch)
treec490aee6faa4fbcc8aac66b205b5087af4c208bc /src/object.c
parent4070b5987a76a2d633a99e137035749559e2da59 (diff)
downloadmruby-54132e436494b4797ca53cbd934963e7d752ac42.tar.gz
mruby-54132e436494b4797ca53cbd934963e7d752ac42.zip
make embed string when create literals
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/object.c b/src/object.c
index b996e6933..2f14c5698 100644
--- a/src/object.c
+++ b/src/object.c
@@ -390,7 +390,6 @@ void
mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t)
{
const struct types *type = builtin_types;
- struct RString *s;
enum mrb_vtype xt;
xt = mrb_type(x);
@@ -409,8 +408,7 @@ mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t)
etype = "Symbol";
}
else if (mrb_special_const_p(x)) {
- s = mrb_str_ptr(mrb_obj_as_string(mrb, x));
- etype = s->as.heap.ptr;
+ etype = RSTRING_PTR(mrb_obj_as_string(mrb, x));
}
else {
etype = mrb_obj_classname(mrb, x);