summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 0cb4502eac..02b0351222 100644
--- a/dir.c
+++ b/dir.c
@@ -1832,9 +1832,8 @@ static VALUE
dir_open_dir(int argc, VALUE *argv)
{
VALUE dir = rb_funcall2(rb_cDir, rb_intern("open"), argc, argv);
- struct dir_data *dirp;
- TypedData_Get_Struct(dir, struct dir_data, &dir_data_type, dirp);
+ rb_check_typeddata(dir, &dir_data_type);
return dir;
}