aboutsummaryrefslogtreecommitdiffstats
path: root/variable.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-07 20:20:34 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-07 20:20:34 +0900
commitce608213872d4efe80708f872ee2e32c547dd734 (patch)
treeec99e2927518bd526855c134e0ebb8317bae2d26 /variable.c
parentbc646e6715bc0113e800f4d7f4dec7bb34123cc1 (diff)
downloadruby-ce608213872d4efe80708f872ee2e32c547dd734.tar.gz
Removed unnecessary cast
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c5
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);
}
}
}