Skip to content
Permalink
Browse files
should not try to set classpath for frozen classes; ref #3340
  • Loading branch information
matz committed Dec 12, 2016
1 parent 6ac5473 commit 9cef2654025e6646b1d0ff259086fc9eb02fff84
Showing 1 changed file with 3 additions and 1 deletion.
@@ -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);
}

0 comments on commit 9cef265

Please sign in to comment.