summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-23 17:06:55 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-23 17:06:55 +0000
commit9942c6ed13910504726ac688a205313b44ed3895 (patch)
treef33268bec64b1e9cc8b89206923dc950193d0457 /file.c
parent8211f8f8afe664a96b8c1473037463293a48a75e (diff)
* file.c (rb_file_s_expand_path): avoid calling rb_scan_args() for
apparent cases. [ruby-talk:79748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 223b243..3a09b4e 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);