diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-07 20:20:34 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-07 20:20:34 +0900 |
commit | ce608213872d4efe80708f872ee2e32c547dd734 (patch) | |
tree | ec99e2927518bd526855c134e0ebb8317bae2d26 /variable.c | |
parent | bc646e6715bc0113e800f4d7f4dec7bb34123cc1 (diff) |
Removed unnecessary cast
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3009
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/variable.c b/variable.c index 2dba76668b..aed71751c0 100644 --- a/variable.c +++ b/variable.c @@ -2123,9 +2123,8 @@ autoload_defined_p(VALUE mod, ID id) static void const_tbl_update(struct autoload_const *); static VALUE -autoload_const_set(VALUE arg) +autoload_const_set(struct autoload_const *ac) { - struct autoload_const *ac = (struct autoload_const *)arg; VALUE klass = ac->mod; ID id = ac->id; check_before_mod_set(klass, id, ac->value, "constant"); @@ -2169,7 +2168,7 @@ autoload_reset(VALUE arg) list_for_each_safe(&ele->constants, ac, next, cnode) { if (ac->value != Qundef) { - autoload_const_set((VALUE)ac); + autoload_const_set(ac); } } } |