diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-05-24 07:06:57 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-05-24 11:50:30 +0900 |
| commit | d121075e49d13c8c5ee0872a7a2bffcca7d2810b (patch) | |
| tree | c7e7f2e5d30a7e8f8ba6ba9b7bd21269196d394b /src/class.c | |
| parent | e323cd0c6ebdeeb42c267a5fe28cec87ae2f00a0 (diff) | |
| download | mruby-d121075e49d13c8c5ee0872a7a2bffcca7d2810b.tar.gz mruby-d121075e49d13c8c5ee0872a7a2bffcca7d2810b.zip | |
class.c: no need to create aliases if both symbols are same.
Diffstat (limited to 'src/class.c')
| -rw-r--r-- | src/class.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/class.c b/src/class.c index 046e99f26..30e2b2603 100644 --- a/src/class.c +++ b/src/class.c @@ -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)) { |
