should not try to set classpath for frozen classes; ref #3340

parent 6ac54734
......@@ -1589,7 +1589,9 @@ mrb_class_path(mrb_state *mrb, struct RClass *c)
name = mrb_sym2name_len(mrb, sym, &len);
path = mrb_str_new(mrb, name, len);
}
mrb_obj_iv_set(mrb, (struct RObject*)c, classpath, path);
if (!MRB_FROZEN_P(c)) {
mrb_obj_iv_set(mrb, (struct RObject*)c, classpath, path);
}
}
return mrb_str_dup(mrb, path);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment