diff options
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -207,8 +207,7 @@ dir_s_chdir(argc, argv, obj) char *dist = ""; rb_secure(2); - rb_scan_args(argc, argv, "01", &path); - if (!NIL_P(path)) { + if (rb_scan_args(argc, argv, "01", &path) == 1) { Check_SafeStr(path); dist = RSTRING(path)->ptr; } |