summaryrefslogtreecommitdiffhomepage
path: root/src/variable.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-08-18 23:36:52 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-08-18 23:42:34 +0900
commit29ad0a796498993b9b839162c47d41536df7cf93 (patch)
treed3420e77e463b3fd68160b412105896bb261351f /src/variable.c
parenta8bd06904decf2a4641c068fcb271b5b13d37914 (diff)
downloadmruby-29ad0a796498993b9b839162c47d41536df7cf93.tar.gz
mruby-29ad0a796498993b9b839162c47d41536df7cf93.zip
`capacify' for `mrb_str_new_capa` should not be `0`.
Diffstat (limited to 'src/variable.c')
-rw-r--r--src/variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/variable.c b/src/variable.c
index 2902ad288..7395f23c7 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -1108,7 +1108,7 @@ mrb_class_find_path(mrb_state *mrb, struct RClass *c)
name = find_class_sym(mrb, mrb_class_ptr(outer), c);
if (name == 0) return mrb_nil_value();
str = mrb_class_name(mrb, mrb_class_ptr(outer));
- path = mrb_str_new_capa(mrb, 0);
+ path = mrb_str_new_capa(mrb, 40);
mrb_str_cat_cstr(mrb, path, str);
mrb_str_cat_cstr(mrb, path, "::");