mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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.
This commit is contained in:
+1
-1
@@ -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 *
|
||||
|
||||
Reference in New Issue
Block a user