mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
class.c: no need to create aliases if both symbols are same.
This commit is contained in:
@@ -2197,6 +2197,7 @@ mrb_obj_class(mrb_state *mrb, mrb_value obj)
|
||||
MRB_API void
|
||||
mrb_alias_method(mrb_state *mrb, struct RClass *c, mrb_sym a, mrb_sym b)
|
||||
{
|
||||
if (a == b) return;
|
||||
mrb_method_t m = mrb_method_search(mrb, c, b);
|
||||
|
||||
if (!MRB_METHOD_CFUNC_P(m)) {
|
||||
|
||||
Reference in New Issue
Block a user