Skip to content
Permalink
Browse files
move mrb_str_dup() to mrb_class_path; ref #2470
Class#to_s used to return same string repeatedly,
that mean you can modify "class name" by modifying
the return value from Class#to_s.
  • Loading branch information
matz committed Nov 13, 2016
1 parent 01dddaf commit 1422e5763005e50ce5f7874910e1a130a12091c9
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1539,7 +1539,7 @@ mrb_class_path(mrb_state *mrb, struct RClass *c)
}
mrb_obj_iv_set(mrb, (struct RObject*)c, classpath, path);
}
return path;
return mrb_str_dup(mrb, path);
}

MRB_API struct RClass *

0 comments on commit 1422e57

Please sign in to comment.