summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 15:20:15 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commit703783324c16b8b2b50210d1a7d1119902abbb8b (patch)
treed594ba9029a1ddcee223fcb2f39be07ef20daca1 /dir.c
parent5c7c2d9951f2512ca10ea38fecc48d8ac67502e6 (diff)
rb_ensure now free from ANYARGS
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_ensure, which also revealed many arity / type mismatches.
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 18c10f2..bfd085e 100644
--- a/dir.c
+++ b/dir.c
@@ -1010,8 +1010,9 @@ struct chdir_data {
};
static VALUE
-chdir_yield(struct chdir_data *args)
+chdir_yield(VALUE v)
{
+ struct chdir_data *args = (void *)v;
dir_chdir(args->new_path);
args->done = TRUE;
chdir_blocking++;
@@ -1021,8 +1022,9 @@ chdir_yield(struct chdir_data *args)
}
static VALUE
-chdir_restore(struct chdir_data *args)
+chdir_restore(VALUE v)
{
+ struct chdir_data *args = (void *)v;
if (args->done) {
chdir_blocking--;
if (chdir_blocking == 0)