summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/file.c b/file.c
index 223b243fc7..3a09b4e628 100644
--- a/file.c
+++ b/file.c
@@ -1758,6 +1758,10 @@ rb_file_s_expand_path(argc, argv)
VALUE *argv;
{
VALUE fname, dname;
+
+ if (argc == 1) {
+ return rb_file_expand_path(argv[0], Qnil);
+ }
rb_scan_args(argc, argv, "11", &fname, &dname);
return rb_file_expand_path(fname, dname);